cc.Class({ extends: cc.Component, properties: { startDelayTime: { default: 800, displayName: "起始延迟的时间" }, hideNode: { type: cc.Node, default: [], displayName: "成功后需要隐藏的节点" } }, onLoad: function () { this.isGameWin = false; this.node.switchEvent = this.switchEvent.bind(this); }, start: function () {}, switchEvent: function () { var e = this; if (1 != this.isGameWin) { setTimeout(function () { cc.global._gameManage.onDuiHaoEffect(); }, 500); this.isGameWin = true; this.node.stopAllActions(); if (this.hideNode) { for (var o = 0; o < this.hideNode.length; o++) { this.hideNode[o].active = false; } } setTimeout(function () { cc.global.LoadPreFtabData("game1/prefab/gameui/game1_victory", function () {}.bind(e)); }, this.startDelayTime); } } });