Project1
标题:
多个重叠的精灵按钮,点击时只执行最上面的,怎么做
[打印本页]
作者:
玄羽
时间:
2019-1-21 00:14
标题:
多个重叠的精灵按钮,点击时只执行最上面的,怎么做
本帖最后由 玄羽 于 2019-1-22 00:26 编辑
Sprite_Button.prototype.processTouch = function() {
if (this.isActive()) {
if (TouchInput.isTriggered() && this.isButtonTouched()&&!this.isTransparency()) {
this._touching = true;
}
if (this._touching) {
if (TouchInput.isReleased() || !this.isButtonTouched()) {
this._touching = false;
if (TouchInput.isReleased()) {
this.callClickHandler();
}
}
}
} else {
this._touching = false;
}
};
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1