We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sprite(SpriteFrame|String newSpriteFrame) { var node = new cc.Node("Sprite"); var sprite = node.addComponent(cc.Sprite); sprite.spriteFrame = newSpriteFrame; return sprite } cc.loader.loadxxx var abc=cc.Sprite('abc');
希望添加这样的功能吧!不止Sprite。。。
The text was updated successfully, but these errors were encountered:
可以考虑提供一些类似 cc.Sprite.createNode('abc') 的 API,不过这种函数用户很容易自己封装一下吧?
Sorry, something went wrong.
感觉没必要,之前就是这种API太多,臃肿
No branches or pull requests
Sprite(SpriteFrame|String newSpriteFrame) {
var node = new cc.Node("Sprite");
var sprite = node.addComponent(cc.Sprite);
sprite.spriteFrame = newSpriteFrame;
return sprite
}
cc.loader.loadxxx
var abc=cc.Sprite('abc');
希望添加这样的功能吧!不止Sprite。。。
The text was updated successfully, but these errors were encountered: