(x: number, y: number)
| 33 | } |
| 34 | |
| 35 | private drawCarpetStuff(x: number, y: number): void{ |
| 36 | // We do different things depending on the step |
| 37 | switch(Saving.loadNumber("fourthHouseCarpetStep")){ |
| 38 | case 0: // The lollipop is still under the carpet |
| 39 | // We add a button on the area of the carpet around the lollipop |
| 40 | this.renderArea.addMultipleAsciiButtons("fourthHouseCarpetButton", |
| 41 | x-2, x+2, y-1, |
| 42 | x-6, x+1, y, |
| 43 | x-4, x, y+1); |
| 44 | // We add the link |
| 45 | this.renderArea.addLinkCall(".fourthHouseCarpetButton", new CallbackCollection(this.clickOnCarpet.bind(this))); |
| 46 | break; |
| 47 | case 1: // The lollipop is outside the carpet, ready to be clicked |
| 48 | // We draw the lollipop |
| 49 | this.renderArea.drawArray(Database.getAscii("places/village/fourthHouseLollipopUnderCarpet"), x, y); |
| 50 | // We add a button on the lollipop |
| 51 | this.renderArea.addAsciiButton(x, x+4, y, "fourthHouseLollipopUnderCarpetButton"); |
| 52 | // We add the link |
| 53 | this.renderArea.addLinkCall(".fourthHouseLollipopUnderCarpetButton", new CallbackCollection(this.pickCarpetLollipop.bind(this))); |
| 54 | break; |
| 55 | case 2: // The lollipop is taken, nothing to do here |
| 56 | break; |
| 57 | } |
| 58 | } |
| 59 | |
| 60 | private drawLollipopOnCupboardStuff(x: number, y: number): void{ |
| 61 | // If we didn't find the lollipop yet |
no test coverage detected