| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- import GamesHallController from "../view/GamesHallController"
- cc.Class({
- extends: cc.Component,
- properties: {
- },
- ctor: function () {
- },
- onLoad () {
- },
- start () {
- },
-
- onDestroy()
- {
- },
- initScene()
- {
- this.SceneLevel = 1
- },
- playShow()
- {
- this.node.active = true
- var actionTo = cc.moveBy(0.3, cc.v2(-this.node.parent.width, 0));
- this.node.width = this.node.parent.width
- this.node.runAction(actionTo)
- // this.setShowingHall(this)
- if (this.parentScene.setShowingHall) {
- this.parentScene.setShowingHall(this)
- }
- },
- playEnd(nextScense)
- {
- var finished = cc.callFunc(function() {
- this.node.active = false;
- if (this.parentScene) {
- if(nextScense && nextScense.playShow)
- {
- nextScense.playShow()
- if (this.parentScene.setShowingHall) {
- this.parentScene.setShowingHall(nextScense)
- }
- }else if (this.parentScene && this.parentScene.playShow) {
- this.parentScene.playShow()
- if (this.parentScene.setShowingHall) {
- this.parentScene.setShowingHall(this.parentScene)
- }
- // if (this.parentScene.parentScene && this.parentScene.parentScene.setHalllistDisplay) {
- // this.parentScene.parentScene.setHalllistDisplay(true)
- // }
- }
- }
-
- if (this.extraPlay) {
- this.extraPlay()
- }
- }, this, null);
- var actionTo = cc.sequence(cc.moveBy(0.3, cc.v2(this.node.parent.width, 0)),finished);
- this.node.runAction(actionTo)
- },
- setShowingHall(hall){
- if (this.parentScene && this.parentScene.setShowingHall) {
- this.parentScene.setShowingHall(hall)
- }
- },
-
- });
|