1234567891011121314151617181920212223242526 |
- var UIHelper = require("UIHelper");
- cc.Class({
- extends: cc.Component,
- properties: {
- },
- // use this for initialization
- onLoad: function () {
- var btn = this.node.getChildByName("btn_close");
- cc.addClickEvent(btn,this.node,"onBtnClose","onBtnClicked");
- },
-
- onBtnClicked:function(event){
- if(event.target.name == "btn_close"){
- UIHelper.playButtonEffect("close");
- this.node.active = false;
- }
- }
-
- });
|