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

Method isOutOfArea

code/main/QuestEntity.ts:296–309  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

294 }
295
296 public isOutOfArea(): boolean{
297 // If the entity if too much out of the area, we return true
298 if(this.globalPosition.x < -this.getQuest().getLeftLimit())
299 return true;
300 if(this.globalPosition.y < -this.getQuest().getTopLimit())
301 return true;
302 if(this.globalPosition.x > this.quest.getRealQuestSize().x + this.getQuest().getRightLimit())
303 return true;
304 if(this.globalPosition.y > this.quest.getRealQuestSize().y + this.getQuest().getBottomLimit())
305 return true;
306
307 // Else we return false
308 return false;
309 }
310
311 public jump(jumpDuration: number, jumpSpeed: number = 1): boolean{
312 // BUGS

Callers 1

updateEntitiesMethod · 0.80

Calls 6

getQuestMethod · 0.95
getTopLimitMethod · 0.80
getRealQuestSizeMethod · 0.80
getBottomLimitMethod · 0.80
getLeftLimitMethod · 0.45
getRightLimitMethod · 0.45

Tested by

no test coverage detected