MCPcopy Create free account
hub / github.com/candybox2/candybox2.github.io / drawTalkingCandy

Method drawTalkingCandy

code/main/CastleTower.ts:90–102  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

88 }
89
90 private drawTalkingCandy(): void{
91 // If all the stones are in the tower AND we didn't already take the talking candy, we draw the key
92 if(Saving.loadBool("castleTowerPStoneDone") && Saving.loadBool("castleTowerLStoneDone") && Saving.loadBool("castleTowerAStoneDone") && Saving.loadBool("castleTowerYStoneDone") && Saving.loadBool("castleTowerTookTalkingCandy") == false){
93 // Draw the ascii art
94 this.renderArea.drawArray(Database.getAscii("places/castle/tower/talkingCandy"), 47, 22);
95
96 // Draw the button
97 this.renderArea.addMultipleAsciiButtons("castleTowerTalkingCandyButton",
98 47, 50, 22,
99 47, 50, 23);
100 this.renderArea.addLinkCall(".castleTowerTalkingCandyButton", new CallbackCollection(this.takeTalkingCandy.bind(this)));
101 }
102 }
103
104 private drawStone(savingName: string, ourSavingName: string, asciiArtName: string, pos: Pos): void{
105 // If we have the stone but it isn't in the tower yet

Callers 1

updateMethod · 0.95

Calls 5

drawArrayMethod · 0.80
getAsciiMethod · 0.80
addLinkCallMethod · 0.80
bindMethod · 0.80

Tested by

no test coverage detected