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

Method update

code/main/Xinopherydon.ts:42–49  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

40
41 // update()
42 public update(): void{
43 super.update();
44
45 console.log(this.getHp());
46
47 // We heal ourselves if the player is too far on the left
48 if(this.getQuest().getGame().getPlayer().getGlobalPosition().x < this.getGlobalPosition().x - 50) this.heal(50);
49 }
50
51 // willDie()
52 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