(x: number, y: number)
| 33 | |
| 34 | // Private methods |
| 35 | private addControls(x: number, y: number): void{ |
| 36 | // If there's a game running, we add the controls |
| 37 | if(this.gameRunning != null){ |
| 38 | // UP button |
| 39 | this.renderArea.addAsciiButton(x, x + 4, y, "thirdHouseUpButton"); |
| 40 | this.renderArea.addLinkCall(".thirdHouseUpButton", new CallbackCollection(this.pressedUpButton.bind(this))); |
| 41 | |
| 42 | // Space button |
| 43 | this.renderArea.addAsciiButton(x + 7, x + 25, y + 1, "thirdHouseSpaceButton"); |
| 44 | this.renderArea.addLinkCall(".thirdHouseSpaceButton", new CallbackCollection(this.pressedSpaceButton.bind(this))); |
| 45 | |
| 46 | // DOWN button |
| 47 | this.renderArea.addAsciiButton(x + 28, x + 34, y, "thirdHouseDownButton"); |
| 48 | this.renderArea.addLinkCall(".thirdHouseDownButton", new CallbackCollection(this.pressedDownButton.bind(this))); |
| 49 | } |
| 50 | } |
| 51 | |
| 52 | private addInsertCandiesButtons(x: number, y: number): void{ |
| 53 | // First button (10 candies) |
no test coverage detected