Created
August 26, 2015 04:54
-
-
Save ldd/adc36599a958542207a2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var glbPlaceManager = null; | |
var glbTimerManager = null; | |
var glbBonusManager = null; | |
var glbCompleteGame = false; | |
var glbCompleteMessage = false; | |
var glbSoundEffects = true; | |
game.PlayScreen = me.ScreenObject.extend({ | |
/** | |
* action to perform on state change | |
*/ | |
onResetEvent: function() { | |
// load a level | |
this.exit = false; | |
this.restart = true; | |
me.levelDirector.loadLevel("index"); | |
game.data.score = 0; | |
var placeManager = new game.PlaceManager(0, 0); | |
glbPlaceManager = placeManager; | |
// add count down timer | |
this.TimerHUD = new game.HUD.TimerManager(); | |
glbTimerManager = this.TimerHUD; | |
me.game.world.addChild(this.TimerHUD); | |
// add our HUD to the game world | |
this.HUD = new game.HUD.Container(); | |
me.game.world.addChild(this.HUD); | |
this.mobile_ui = null; | |
// if (me.device.isMobile) { | |
this.mobile_ui = new game.UI(); | |
me.game.world.addChild(this.mobile_ui, Infinity); | |
// } | |
}, | |
/** | |
* action to perform on state change | |
*/ | |
onDestroyEvent: function() { | |
// if (this.mobile_ui) { | |
me.game.remove(this.mobile_ui, true); | |
this.mobile_ui = null; | |
// } | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment