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

Method update

code/main/SecondHouse.ts:146–167  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

144 }
145
146 private update(): void{
147 // Erase everything
148 this.renderArea.resetAllButSize();
149
150 // Back to the village button
151 this.addBackToTheVillageButton(this.renderArea, "secondHouseBackToTheVillageButton");
152
153 // Draw the house
154 this.renderArea.drawArray(Database.getAscii("places/village/secondHouse"), 0, 3);
155
156 // Draw items
157 this.drawItems();
158
159 // Should we draw the intro speech ?
160 if(this.shouldDrawIntroSpeech)
161 this.drawIntroSpeech();
162
163 // If there's a selected item, draw the stuff related to it (speech and possibly buying button)
164 if(this.selectedItemIndex != null){
165 this.drawSelectedItemStuff();
166 }
167 }
168}

Callers 4

constructorMethod · 0.95
willBeDisplayedMethod · 0.95
buySelectedItemMethod · 0.95
clickedOnItemMethod · 0.95

Calls 7

drawItemsMethod · 0.95
drawIntroSpeechMethod · 0.95
drawSelectedItemStuffMethod · 0.95
resetAllButSizeMethod · 0.80
drawArrayMethod · 0.80
getAsciiMethod · 0.80

Tested by

no test coverage detected