(quest: Quest, globalPosition: Pos)
| 6 | |
| 7 | // Constructor |
| 8 | constructor(quest: Quest, globalPosition: Pos){ |
| 9 | // Call the mother constructor |
| 10 | super(quest, |
| 11 | globalPosition, |
| 12 | new Naming("The monster", "the monster"), |
| 13 | new RenderArea(13, 4), |
| 14 | new Pos(0, 0), |
| 15 | new CollisionBoxCollection(new CollisionBox(this, new Pos(0, 0), new Pos(13, 1)), |
| 16 | new CollisionBox(this, new Pos(1, 0), new Pos(11, 1)), |
| 17 | new CollisionBox(this, new Pos(2, 0), new Pos(9, 1)), |
| 18 | new CollisionBox(this, new Pos(3, 0), new Pos(7, 1))), |
| 19 | new QuestEntityMovement() |
| 20 | ); |
| 21 | |
| 22 | // At first, no egg was destroyed |
| 23 | this.anEggWasDestroyed = false; |
| 24 | |
| 25 | // Set the ascii art |
| 26 | this.getRenderArea().drawArray(Database.getAscii("places/quests/castle/room3/monster")); |
| 27 | this.setTransparency(new RenderTransparency(" ", "%")); |
| 28 | |
| 29 | // Set the weapon and its delay |
| 30 | this.addQuestEntityWeapon(new QuestEntityWeapon(this.getQuest(), this, new Naming("??", "??"), new CollisionBoxCollection(new CollisionBox(this, new Pos(-1, -1), new Pos(15, 6))), 10000)); |
| 31 | this.getLastQuestEntityWeapon().getCloseCombatDelay().setFixedDelay(0); |
| 32 | } |
| 33 | |
| 34 | // update() |
| 35 | public update(): void{ |
nothing calls this directly
no test coverage detected