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

Method dropADemon

code/main/Camazotz.ts:74–83  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

72
73 // Private methods
74 private dropADemon(): void{
75 // Create the demon
76 var demon: Demon = new Demon(this.getQuest(), this.getGlobalPosition().plus(new Pos(8, 8)));
77
78 // Set the health bar
79 demon.setHealthBar(new QuestEntityHealthBar(demon, new Pos(6, 1)));
80
81 // Add the demon
82 this.getQuest().addEntity(demon);
83 }
84
85 private handleDropADemon(): void{
86 // If it's time to add one

Callers 1

handleDropADemonMethod · 0.95

Calls 5

getQuestMethod · 0.80
plusMethod · 0.80
getGlobalPositionMethod · 0.80
setHealthBarMethod · 0.80
addEntityMethod · 0.80

Tested by

no test coverage detected