(game: Game)
| 21 | |
| 22 | // Constructor |
| 23 | constructor(game: Game){ |
| 24 | super(game); |
| 25 | |
| 26 | // Set the default step and player position |
| 27 | if(Saving.loadBool("dragonDone") == false){ // If we never talked with the dragon yet |
| 28 | this.step = DragonStep.PLAYER_MOVING; |
| 29 | this.playerPos = 0; |
| 30 | } |
| 31 | else{ // Else, we already talked with the dragon |
| 32 | this.step = DragonStep.TALKING; |
| 33 | this.playerPos = 60; |
| 34 | } |
| 35 | |
| 36 | // Launch the interval and get the ID |
| 37 | this.timerIntervalID = setInterval(this.actionInterval.bind(this), 100); |
| 38 | |
| 39 | // Resize and update |
| 40 | this.renderArea.resizeFromArray(Database.getAscii("places/dragonFoot"), 0, 3); |
| 41 | this.update(); |
| 42 | } |
| 43 | |
| 44 | // getRenderArea() |
| 45 | public getRenderArea(): RenderArea{ |
nothing calls this directly
no test coverage detected