(quest: Quest, pos: Pos)
| 3 | class Camel extends QuestEntity{ |
| 4 | // Constructor |
| 5 | constructor(quest: Quest, pos: Pos){ |
| 6 | super(quest, |
| 7 | pos, |
| 8 | new Naming("A camel", "a camel"), |
| 9 | new RenderArea(7, 2), |
| 10 | new Pos(0, 0), |
| 11 | new CollisionBoxCollection(new CollisionBox(this, new Pos(0, 0), new Pos(6, 1)), new CollisionBox(this, new Pos(2, 1), new Pos(5, 1))), |
| 12 | new QuestEntityMovement() |
| 13 | ); |
| 14 | |
| 15 | // Set gravity |
| 16 | this.getQuestEntityMovement().setGravity(true); |
| 17 | |
| 18 | // Set destructible |
| 19 | this.setDestructible(true); |
| 20 | this.setMaxHp(7); |
| 21 | this.setHp(7); |
| 22 | |
| 23 | // Set the ascii art and the transparent character |
| 24 | this.getRenderArea().drawArray(Database.getAscii("places/quests/desert/camel")); |
| 25 | this.setTransparency(new RenderTransparency(" ")); |
| 26 | |
| 27 | // Set the weapon and its delay |
| 28 | this.addQuestEntityWeapon(new QuestEntityWeapon(this.getQuest(), this, new Naming("Its long neck", "its long neck"), new CollisionBoxCollection(new CollisionBox(this, new Pos(-1, 0), new Pos(3, 3))), 5)); |
| 29 | this.getLastQuestEntityWeapon().getCloseCombatDelay().setBetweenDelay(5, 7); |
| 30 | } |
| 31 | |
| 32 | // Public methods |
| 33 | public willDie(): void{ |
nothing calls this directly
no test coverage detected