(game: Game)
| 5 | class Cellar extends Quest{ |
| 6 | // Constructor |
| 7 | constructor(game: Game){ |
| 8 | super(game); |
| 9 | |
| 10 | // Resize the quest |
| 11 | this.resizeQuest(100, 3); |
| 12 | |
| 13 | // Add collision boxes around |
| 14 | this.addPlayerCollisionBoxes(true, false, true, true); |
| 15 | |
| 16 | // Add the player |
| 17 | this.getGame().getPlayer().loadCandyBoxCharacter(this); |
| 18 | this.getGame().getPlayer().setGlobalPosition(new Pos(0, 2)); |
| 19 | this.getGame().getPlayer().setQuestEntityMovement(new QuestEntityMovement(new Pos(1, 0))); |
| 20 | this.getGame().getPlayer().getQuestEntityMovement().setGravity(true); |
| 21 | this.getGame().getPlayer().getQuestEntityMovement().setWormsLike(false); |
| 22 | this.addEntity(this.getGame().getPlayer()); |
| 23 | |
| 24 | // Add the ground |
| 25 | this.addGround(); |
| 26 | |
| 27 | // Add the rats |
| 28 | this.addRats(); |
| 29 | |
| 30 | // Add a delimiter and the message |
| 31 | this.getGame().getQuestLog().addMessage(new QuestLogMessage("You enter the cellar. It's dark and you hear rats squeaking all around you.")); |
| 32 | } |
| 33 | |
| 34 | // Public methods |
| 35 | public endQuest(win: boolean): void{ |
nothing calls this directly
no test coverage detected