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

Method checkCollision

code/main/GalacticWars.ts:189–198  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

187 }
188
189 private checkCollision(): boolean{
190 // If the ship is outside the screen, we return true
191 if(this.shipYPosition < 0)
192 return true;
193 if(this.shipYPosition > 9)
194 return true;
195
196 // No collision, we return false
197 return false;
198 }
199
200 private checkCollisionWithAsteroids(): boolean{
201 // Boolean used to know if we already lose one hp or not

Callers 1

runGameMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected