| 24 | |
| 25 | // Constructor |
| 26 | constructor(game: Game){ |
| 27 | super(game); |
| 28 | |
| 29 | // Byt default, the interval ID is set to null |
| 30 | this.intervalID = null; |
| 31 | |
| 32 | // Set the cut scene max timer |
| 33 | this.cutSceneMaxTimer = 72; |
| 34 | |
| 35 | // If it's the first time we visit the tower, we change the bool, set the timer and start the interval |
| 36 | if(Saving.loadBool("castleTowerFirstVisitDone") == false){ |
| 37 | Saving.saveBool("castleTowerFirstVisitDone", true); |
| 38 | this.cutSceneTimer = 0; |
| 39 | this.intervalID = setInterval(this.actionInterval.bind(this), 100); |
| 40 | } |
| 41 | // Else, we set the timer to the max timer value, no need to use it |
| 42 | else{ |
| 43 | this.cutSceneTimer = this.cutSceneMaxTimer; |
| 44 | } |
| 45 | |
| 46 | this.renderArea.resize(100, 38); |
| 47 | this.update(); |
| 48 | } |
| 49 | |
| 50 | // getRenderArea() |
| 51 | public getRenderArea(): RenderArea{ |