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

Method update

code/main/Moutains.ts:30–63  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

28 }
29
30 private update(): void{
31 // Erase everything
32 this.renderArea.resetAllButSize();
33
34 // Back to the map button
35 this.addBackToMainMapButton(this.renderArea, "mountainsBackToTheMapButton");
36
37 // Draw the moutains
38 this.renderArea.drawArray(Database.getAscii("places/mountains"), 0, 3);
39
40 // If we didn't get the pogo stick yet
41 if(Saving.loadBool("gridItemPossessedPogoStick") == false){
42 // Add the "*" showing that there's a pogo stick here
43 this.renderArea.drawString("*", 52, 11);
44
45 // Draw the text
46 this.renderArea.drawString(Database.getText("mountainsText0"), 19, 22);
47 this.renderArea.drawString(Database.getText("mountainsText1"), 19, 23);
48
49 // Add the button
50 this.renderArea.addAsciiRealButton(Database.getText("mountainsTextButton"), 19, 25, "mountainsClimbButton", Database.getTranslatedText("mountainsTextButton"));
51 this.renderArea.addLinkCall(".mountainsClimbButton", new CallbackCollection(this.getPogoStick.bind(this)));
52
53 // Draw the translated text
54 this.renderArea.drawString(Database.getTranslatedText("mountainsText0"), 19, 27, true);
55 this.renderArea.drawString(Database.getTranslatedText("mountainsText1"), 19, 28, true);
56 }
57 // Else, we already found it
58 else{
59 this.renderArea.drawString(Database.getText("mountainsTextAfter"), 19, 22);
60
61 this.renderArea.drawString(Database.getTranslatedText("mountainsTextAfter"), 19, 24, true);
62 }
63 }
64}

Callers 2

constructorMethod · 0.95
getPogoStickMethod · 0.95

Calls 9

resetAllButSizeMethod · 0.80
drawArrayMethod · 0.80
getAsciiMethod · 0.80
drawStringMethod · 0.80
addAsciiRealButtonMethod · 0.80
addLinkCallMethod · 0.80
bindMethod · 0.80
getTextMethod · 0.45

Tested by

no test coverage detected