(top: boolean, right: boolean, bottom: boolean, left: boolean)
| 85 | |
| 86 | // Public methods |
| 87 | public addPlayerCollisionBoxes(top: boolean, right: boolean, bottom: boolean, left: boolean): void{ |
| 88 | // We remove boxes |
| 89 | this.playerCollisionBoxes.removeBoxes(); |
| 90 | |
| 91 | // And we re-add them |
| 92 | if(top) this.playerCollisionBoxes.addBox(new Pos(-1, -1), new Pos(this.getRealQuestSize().x + 2, 1)); |
| 93 | if(right) this.playerCollisionBoxes.addBox(new Pos(this.getRealQuestSize().x, -1), new Pos(1, this.getRealQuestSize().y + 2)); |
| 94 | if(bottom) this.playerCollisionBoxes.addBox(new Pos(-1, this.getRealQuestSize().y), new Pos(this.getRealQuestSize().x + 2, 1)); |
| 95 | if(left) this.playerCollisionBoxes.addBox(new Pos(-1, -1), new Pos(1, this.getRealQuestSize().y+2)); |
| 96 | } |
| 97 | |
| 98 | public addEntity(entity: QuestEntity): boolean{ |
| 99 | // Add the entity |
no test coverage detected