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

Method update

code/main/Village.ts:48–71  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

46 }
47
48 private update(): void{
49 // Erase everything
50 this.renderArea.resetAllButSize();
51
52 // Back to the map button only if we possess the main map
53 if(Saving.loadBool("gridItemPossessedMainMap"))
54 this.addBackToMainMapButton(this.renderArea, "villageBackToTheMapButton");
55
56 // Draw the ascii
57 this.renderArea.drawArray(Database.getAscii("places/village/village"), 0, 3);
58
59 // Draw smokes
60 for(var i = 0; i < this.smokes.length; i++){
61 this.smokes[i].draw(this.renderArea);
62 }
63
64 // Load various things
65 this.loadFirstHouse(2, 3 + 24);
66 this.loadSecondHouse(18, 3 + 21);
67 this.loadThirdHouse(32, 3 + 25);
68 this.loadForge(61, 3 + 24);
69 this.loadFourthHouse(77, 3 + 24);
70 this.loadFifthHouse(91, 3 + 25);
71 }
72
73 // Private "go to" methods
74 private goToFirstHouse(): void{

Callers 3

constructorMethod · 0.95
willBeDisplayedMethod · 0.95
actionSmokesMethod · 0.95

Calls 11

loadFirstHouseMethod · 0.95
loadSecondHouseMethod · 0.95
loadThirdHouseMethod · 0.95
loadForgeMethod · 0.95
loadFourthHouseMethod · 0.95
loadFifthHouseMethod · 0.95
resetAllButSizeMethod · 0.80
drawArrayMethod · 0.80
getAsciiMethod · 0.80
drawMethod · 0.45

Tested by

no test coverage detected