()
| 47 | |
| 48 | // update() |
| 49 | public update(): void{ |
| 50 | super.update(); |
| 51 | |
| 52 | // If the chest isn't opened yet |
| 53 | if(this.isOpened == false){ |
| 54 | // If the player has a collision box collection |
| 55 | if(this.getQuest().getGame().getPlayer().getCbc() != null){ |
| 56 | // If it collides with our opening collision box collection |
| 57 | if(this.getQuest().getGame().getPlayer().getCbc().collidesWith(this.openingCollisionBoxCollection)){ |
| 58 | // We are now opened |
| 59 | this.isOpened = true; |
| 60 | // We fire the callback collection |
| 61 | this.callbackCollection.fire(); |
| 62 | // We re-draw |
| 63 | this.drawChestAscii(); |
| 64 | } |
| 65 | } |
| 66 | } |
| 67 | } |
| 68 | |
| 69 | // Private methods |
| 70 | private drawChestAscii(): void{ |
nothing calls this directly
no test coverage detected