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

Method constructor

code/main/CastleTower.ts:26–48  ·  view source on GitHub ↗
(game: Game)

Source from the content-addressed store, hash-verified

24
25 // Constructor
26 constructor(game: Game){
27 super(game);
28
29 // Byt default, the interval ID is set to null
30 this.intervalID = null;
31
32 // Set the cut scene max timer
33 this.cutSceneMaxTimer = 72;
34
35 // If it's the first time we visit the tower, we change the bool, set the timer and start the interval
36 if(Saving.loadBool("castleTowerFirstVisitDone") == false){
37 Saving.saveBool("castleTowerFirstVisitDone", true);
38 this.cutSceneTimer = 0;
39 this.intervalID = setInterval(this.actionInterval.bind(this), 100);
40 }
41 // Else, we set the timer to the max timer value, no need to use it
42 else{
43 this.cutSceneTimer = this.cutSceneMaxTimer;
44 }
45
46 this.renderArea.resize(100, 38);
47 this.update();
48 }
49
50 // getRenderArea()
51 public getRenderArea(): RenderArea{

Callers

nothing calls this directly

Calls 3

updateMethod · 0.95
bindMethod · 0.80
resizeMethod · 0.65

Tested by

no test coverage detected