cc.Class({ extends: cc.Component, properties: { }, ctor: function () { }, onLoad () { }, start () { }, onDestroy() { }, playShow(parentHall) { if (parentHall) { this.parentHall = parentHall } this.node.active = true var actionTo = cc.moveBy(0.3, cc.v2(-1226, 0)); var actionTo1 = cc.moveBy(0.3, cc.v2(103, 0)); this.gamesNode.runAction(actionTo) this.plane.runAction(actionTo1) }, playEnd(direction) { var finished = cc.callFunc(function() { this.node.active = false; if (this.parentHall && this.parentHall.playShow && direction) { this.parentHall.playShow() this.showingHall = this.parentHall }else if (this.parentHall && this.parentHall.playShow && !direction) { this.showingHall.playShow(this) } this.setShowingHall(this.showingHall) }, this, null); var actionTo = cc.sequence(cc.moveBy(0.3, cc.v2(1226, 0)),finished); var actionTo1 = cc.moveBy(0.3, cc.v2(-103, 0)); this.gamesNode.runAction(actionTo) this.plane.runAction(actionTo1) }, setShowingHall(Hall) { if (this.parentHall && this.parentHall.setShowingHall) { this.showingHall = Hall this.parentHall.setShowingHall(this.showingHall) } } });