(game: Game)
| 27 | |
| 28 | // Constructor |
| 29 | constructor(game: Game){ |
| 30 | super(game, "You can move with the down and up arrow keys!"); |
| 31 | |
| 32 | // Resize the quest |
| 33 | this.resizeQuest(100, 30); |
| 34 | |
| 35 | // Add collision boxes around |
| 36 | this.addPlayerCollisionBoxes(true, false, true, true); |
| 37 | |
| 38 | // Gravity is disabled |
| 39 | this.setGravityDisabled(true); |
| 40 | this.setWormsLikeDisabled(true); |
| 41 | |
| 42 | // Add the player |
| 43 | this.getGame().getPlayer().loadMediumCharacter(this); |
| 44 | this.getGame().getPlayer().setGlobalPosition(new Pos(0, 5)); |
| 45 | this.configPlayerOrClone(this.getGame().getPlayer()); |
| 46 | this.addEntity(this.getGame().getPlayer()); |
| 47 | |
| 48 | // Fill the floors array with null values |
| 49 | for(var i = 0; i <= 99 + this.generationProjection; i++){ |
| 50 | this.floors.push(null); |
| 51 | } |
| 52 | |
| 53 | // Generate for the first time |
| 54 | this.generate(0, 99 + this.generationProjection); |
| 55 | |
| 56 | // Add the message |
| 57 | this.getGame().getQuestLog().addMessage(new QuestLogMessage("You jump into the sea! You know you could find precious hidden treasures in the depths...")); |
| 58 | } |
| 59 | |
| 60 | // willBeDisplayed() |
| 61 | public willBeDisplayed(): void{ |
nothing calls this directly
no test coverage detected