[]获取的ui页面里下on事件无法触发
类代码如下:
var GameStartView = function () {
GameStartView.super(this);
this.Start.on(Laya.Event.CLICK, this, this.open);
console.log(this.Start);
GameStartView.prototype.open = function(){
console.log("Open is ok");
}
};
Laya.class(GameStartView,"GameStartView", GameStartUI);
输出:Button {toggle: false, _bitmap: AutoBitmap, _text: Text, _strokeColors: null, _state: 0…}
其中为什么on事件无法触发,该怎么样写?谢谢!
var GameStartView = function () {
GameStartView.super(this);
this.Start.on(Laya.Event.CLICK, this, this.open);
console.log(this.Start);
GameStartView.prototype.open = function(){
console.log("Open is ok");
}
};
Laya.class(GameStartView,"GameStartView", GameStartUI);
输出:Button {toggle: false, _bitmap: AutoBitmap, _text: Text, _strokeColors: null, _state: 0…}
其中为什么on事件无法触发,该怎么样写?谢谢!
没有找到相关结果
已邀请:
要回复问题请先登录
1 个回复
Laya_XS
赞同来自: