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

Method getRenderAreaCenter

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

Source from the content-addressed store, hash-verified

236 }
237
238 public getRenderAreaCenter(): Pos{
239 if(this.renderArea != null)
240 return this.globalPosition.plus(new Pos(Math.floor(this.renderArea.getWidth()/2), Math.floor(this.renderArea.getHeight()/2)))
241 return this.globalPosition;
242 }
243
244 public goTowards(ourPosition: Pos, goalPosition: Pos, minDistance: number = 0, speed: Pos = new Pos(1, 1), dontTakeYInAccount: boolean = false): void{
245 // We create the movement

Callers 6

updateMethod · 0.80
castPlayerBlackholeMethod · 0.80
playerUsedBlackMagicMethod · 0.80
updateMethod · 0.80
updateMethod · 0.80
updateMethod · 0.80

Calls 3

plusMethod · 0.80
getWidthMethod · 0.45
getHeightMethod · 0.45

Tested by

no test coverage detected