var anyPrefab = cc.instantiate(this.anyPrefab);
anyPrefab.getComponent(cc.Label).string='文字';
anyPrefab.setPosition(cc.p(0,0));
this.node.addChild(anyPrefab);
var anyPrefab = cc.instantiate(this.anyPrefab);
anyPrefab.getComponent(cc.Label).string='文字';
anyPrefab.setPosition(cc.p(0,0));
this.node.addChild(anyPrefab);
本文标题:Cocos Creater 使用Label创建的预制资源Pref
本文链接:https://www.haomeiwen.com/subject/ysahoxtx.html
网友评论