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

Method update

code/main/CastleRoom2.ts:35–60  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

33
34 // update()
35 public update(): void{
36 // Reset the area
37 this.renderArea.resetAllButSize();
38
39 // Add the button to go back to the castle
40 this.addBackToTheCastleButton(this.renderArea, "castleRoom2BackToTheCastleButton");
41
42 // If the fire isn't lit yet
43 if(Saving.loadBool("castleRoom2LitFire") == false){
44 // Draw the dark color
45 this.drawDark(0, 3, 100, 27);
46
47 // Add the button on the fire
48 this.drawFireButton(42, 20);
49 }
50 // Else, the fire is lit
51 else{
52 // We draw the fire
53 this.drawFire(42, 20);
54
55 // If we didn't take the object yet
56 if(Saving.loadBool("castleRoom2TookObject") == false){
57 this.drawObject(21, 12);
58 }
59 }
60 }
61
62 // Private methods
63 private actionSmokes(): void{

Callers 4

constructorMethod · 0.95
actionSmokesMethod · 0.95
lightFireMethod · 0.95
takeObjectMethod · 0.95

Calls 6

drawDarkMethod · 0.95
drawFireButtonMethod · 0.95
drawFireMethod · 0.95
drawObjectMethod · 0.95
resetAllButSizeMethod · 0.80

Tested by

no test coverage detected