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

Method update

code/main/DeveloperMagicBall.ts:20–33  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

18
19 // Public methods
20 public update(): void{
21 // If the player isn't targeted yet
22 if(this.playerTargeted == false){
23 // If it's time to target the player
24 if(this.timeToLive <= 0){
25 // We target it
26 this.setTargetTypeTargetEntity(this.getQuest().getGame().getPlayer(), null, new Pos(2, 1));
27 }
28 else this.timeToLive -= 1;
29 }
30
31 // Call the mother class update method
32 super.update();
33 }
34
35 // willDie()
36 public willDie(): void{}

Callers

nothing calls this directly

Calls 4

getPlayerMethod · 0.80
getQuestMethod · 0.80
getGameMethod · 0.45

Tested by

no test coverage detected