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

Method addSeahorse

code/main/TheSea.ts:103–109  ·  view source on GitHub ↗
(pos: Pos, intendedXPosition: number)

Source from the content-addressed store, hash-verified

101 }
102
103 public addSeahorse(pos: Pos, intendedXPosition: number): Seahorse{
104 var seahorse: Seahorse = new Seahorse(this, pos, intendedXPosition);
105 seahorse.setHealthBar(new QuestEntityHealthBar(seahorse, new Pos(4, 1)));
106 if(this.addEntity(seahorse)) // If we manage to add the entity
107 return seahorse; // We return it
108 return null; // Else, we return null
109 }
110
111 public addSeaSnake(pos: Pos): SeaSnake{
112 var seaSnake: SeaSnake = new SeaSnake(this, pos);

Callers

nothing calls this directly

Calls 2

setHealthBarMethod · 0.80
addEntityMethod · 0.80

Tested by

no test coverage detected