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

Method willBeDisplayed

code/main/CandyBox.ts:24–34  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

22
23 // willBeDisplayed()
24 public willBeDisplayed(): void{
25 // We check right now
26 this.checkCandies();
27
28 // And we add the callback
29 this.getGame().getCandies().getCallbackCollection().addCallback(this.checkCandies.bind(this));
30
31 // We add hotkeys
32 this.getGame().addHotkey(new Hotkey("e", new CallbackCollection(this.clickedEatCandiesButton.bind(this))));
33 this.getGame().addHotkey(new Hotkey("t", new CallbackCollection(this.clickedThrowCandiesButton.bind(this))));
34 }
35
36 // Public methods
37 public update(): void{

Callers

nothing calls this directly

Calls 7

checkCandiesMethod · 0.95
addCallbackMethod · 0.80
bindMethod · 0.80
addHotkeyMethod · 0.80
getCallbackCollectionMethod · 0.45
getCandiesMethod · 0.45
getGameMethod · 0.45

Tested by

no test coverage detected