()
| 34 | |
| 35 | // update() |
| 36 | public update(): void{ |
| 37 | super.update(); |
| 38 | |
| 39 | console.log(this.getHp()); |
| 40 | |
| 41 | // We heal ourselves if the player is too far on the left |
| 42 | if(this.getQuest().getGame().getPlayer().getGlobalPosition().x < this.getGlobalPosition().x - 50) this.heal(50); |
| 43 | } |
| 44 | |
| 45 | // willDie() |
| 46 | public willDie(): void{ |