This commit is contained in:
tothvillar
2026-07-09 15:04:14 +08:00
commit e896e2ead4
1180 changed files with 115132 additions and 0 deletions
+49
View File
@@ -0,0 +1,49 @@
cc.Class({
extends: cc.Component,
properties: {
clcicknode: {
default: null,
type: cc.Node,
displayName: "点击的节点"
},
startTime: {
default: 0,
displayName: "起始延迟时间"
},
returnDelayTime: {
default: -1,
displayName: "返回延迟的时间,负数为不返回"
},
eventNode_over: {
default: null,
type: cc.Node,
displayName: "结束事件节点"
},
hideNode: {
type: cc.Node,
default: [],
displayName: "需要隐藏的节点"
}
},
start: function () {
this.clcicknode.on(cc.Node.EventType.TOUCH_END, this.switchEvent, this);
this.canClike = true;
},
switchEvent: function () {
var e = this;
if (this.canClike) {
this.node.parent.parent.getChildByName("hand_zhiyin") && 1 == this.node.parent.parent.getChildByName("hand_zhiyin").active && (this.node.parent.parent.getChildByName("hand_zhiyin").active = false);
if (this.hideNode) {
for (var o = 0; o < this.hideNode.length; o++) {
this.hideNode[o].active = false;
}
}
cc.tween(this.clcicknode).delay(this.startTime).call(function () {
e.canClike = false;
e.eventNode_over && e.eventNode_over.switchEvent();
}).start();
}
},
returnStartPos: function () {},
restoreEvent: function () {}
});