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

Method constructor

code/main/Fireball.ts:30–54  ·  view source on GitHub ↗
(quest: Quest, pos: Pos, naming: Naming, color: Color, size: Pos, damage: number, questEntityDamageReason: QuestEntityDamageReason)

Source from the content-addressed store, hash-verified

28
29 // Constructor
30 constructor(quest: Quest, pos: Pos, naming: Naming, color: Color, size: Pos, damage: number, questEntityDamageReason: QuestEntityDamageReason){
31 // Call the mother class constructor
32 super(quest, pos, naming);
33
34 // Set the size
35 this.size = size;
36
37 // Set the damage
38 this.damage = damage;
39
40 // Set the quest entity damage reason
41 this.questEntityDamageReason = questEntityDamageReason;
42
43 // Create the damage collision box collection
44 this.damageCollisionBoxCollection = new CollisionBoxCollection(new CollisionBox(this, new Pos(0, 0), this.size));
45
46 // Add the color
47 this.addColor(new QuestEntitySpellColor(this.getQuest(), new Pos(0, 0), this.size, color));
48
49 // Create a quest entity movement
50 this.setQuestEntityMovement(new QuestEntityMovement(new Pos(0, 0)));
51
52 // Set the default target type
53 this.setTargetTypeNoTarget(new Pos(0, 0));
54 }
55
56 // Public methods
57 public setTargetTypeNoTarget(movement: Pos): void{

Callers

nothing calls this directly

Calls 4

setTargetTypeNoTargetMethod · 0.95
getQuestMethod · 0.80
addColorMethod · 0.45

Tested by

no test coverage detected