| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- 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(100, 0));
- this.gamesNode.runAction(actionTo)
- if (this.plane) {
- this.plane.runAction(actionTo1)
- }
- this.setShowingHall(this)
- },
- 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)
- if (this.plane) {
- this.plane.runAction(actionTo1)
- }
- },
-
- setShowingHall(Hall)
- {
- if (this.parentHall && this.parentHall.setShowingHall) {
- this.showingHall = Hall
- this.parentHall.setShowingHall(this.showingHall)
- }
- }
- });
|