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

Method update

code/main/Teapot.ts:36–43  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

34
35 // update()
36 public update(): void{
37 super.update();
38
39 console.log(this.getHp());
40
41 // We heal ourselves if the player is too far on the left
42 if(this.getQuest().getGame().getPlayer().getGlobalPosition().x < this.getGlobalPosition().x - 50) this.heal(50);
43 }
44
45 // willDie()
46 public willDie(): void{

Callers

nothing calls this directly

Calls 6

getGlobalPositionMethod · 0.80
getPlayerMethod · 0.80
getQuestMethod · 0.80
healMethod · 0.80
getHpMethod · 0.45
getGameMethod · 0.45

Tested by

no test coverage detected