Files
CocosCreatorTutorial/PomeloClient/assets/Script/view/chat/ChatUi.js
2018-08-22 10:57:12 +08:00

28 lines
583 B
JavaScript

cc.Class({
extends: cc.Component,
properties: {
nodeContent: cc.Node,
prefabItem: cc.Prefab,
editBoxInput: cc.EditBox
},
onLoad() {
this.nodeContent.removeAllChildren();
},
createItem(data, componentName) {
let node = cc.instantiate(this.prefabItem);
node.script = node.getComponent(componentName);
node.script.init();
this.nodeContent.addChild(node);
},
onEventClicked_send() {
if (!this.editBoxInput.string) {
return;
}
}
// update (dt) {},
});