()
| 294 | } |
| 295 | |
| 296 | public isOutOfArea(): boolean{ |
| 297 | // If the entity if too much out of the area, we return true |
| 298 | if(this.globalPosition.x < -this.getQuest().getLeftLimit()) |
| 299 | return true; |
| 300 | if(this.globalPosition.y < -this.getQuest().getTopLimit()) |
| 301 | return true; |
| 302 | if(this.globalPosition.x > this.quest.getRealQuestSize().x + this.getQuest().getRightLimit()) |
| 303 | return true; |
| 304 | if(this.globalPosition.y > this.quest.getRealQuestSize().y + this.getQuest().getBottomLimit()) |
| 305 | return true; |
| 306 | |
| 307 | // Else we return false |
| 308 | return false; |
| 309 | } |
| 310 | |
| 311 | public jump(jumpDuration: number, jumpSpeed: number = 1): boolean{ |
| 312 | // BUGS |
no test coverage detected