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

Method collidesWith

code/main/QuestEntity.ts:171–178  ·  view source on GitHub ↗
(questEntity: QuestEntity, pos: Pos = new Pos(0, 0))

Source from the content-addressed store, hash-verified

169 }
170
171 public collidesWith(questEntity: QuestEntity, pos: Pos = new Pos(0, 0)): boolean{
172 // If we both have a collision box collection, we return the result of the collision test
173 if(this.cbc != null && questEntity.getCbc() != null)
174 return this.cbc.collidesWith(questEntity.getCbc(), pos);
175
176 // Else, we return false, there can't be any collision
177 return false;
178 }
179
180 public draw(renderArea: RenderArea): void{
181 if(this.renderArea != null){

Callers 7

checkCollisionMethod · 0.95
addBirdMethod · 0.45
updateMethod · 0.45
handleDamageMethod · 0.45
handleDamageMethod · 0.45
updateMethod · 0.45
checkCollisionMethod · 0.45

Calls 1

getCbcMethod · 0.80

Tested by

no test coverage detected