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