()
| 82 | } |
| 83 | |
| 84 | public run(): boolean{ |
| 85 | // To store the return value |
| 86 | var returnValue: boolean = false; |
| 87 | |
| 88 | // If we should exit the game, we do so now |
| 89 | if(this.shouldExitGame) |
| 90 | return true; |
| 91 | |
| 92 | // Reset the area |
| 93 | this.getRenderArea().resetAllButSize(); |
| 94 | |
| 95 | // Do something different depending on the step |
| 96 | switch(this.step){ |
| 97 | case SuperRPGStep.SPLASH_SCREEN: |
| 98 | this.drawSplashScreen(); |
| 99 | returnValue = this.runSplashScreen(); |
| 100 | break; |
| 101 | case SuperRPGStep.GAME: |
| 102 | this.drawGame(); |
| 103 | returnValue = this.runGame(); |
| 104 | break; |
| 105 | case SuperRPGStep.LOSE: |
| 106 | this.drawLose(); |
| 107 | returnValue = false; |
| 108 | break; |
| 109 | } |
| 110 | |
| 111 | // We return |
| 112 | return returnValue; |
| 113 | } |
| 114 | |
| 115 | // Public getters |
| 116 | public getCoins(): number{ |
no test coverage detected