Skip to content

Instantly share code, notes, and snippets.

@latenitecali
Created March 1, 2015 00:11
Show Gist options
  • Select an option

  • Save latenitecali/24d69bc99d886358520b to your computer and use it in GitHub Desktop.

Select an option

Save latenitecali/24d69bc99d886358520b to your computer and use it in GitHub Desktop.
collider fixed!
var flameHitResults : Array<CollisionData> = Collision.testShapes(engineDamageFlameCollider, StateGamePlay.asteroidColliderPool);
if(flameHitResults.length > 0) {
for(hit in flameHitResults) {
for(asteroid in StateGamePlay.asteroidPool) {
if(hit.shape2.name == asteroid.name) {
asteroid.destroy();
asteroid = null;
StateGamePlay.asteroidColliderPool.splice(StateGamePlay.asteroidColliderPool.indexOf(hit.shape2), 1);
hit.shape2.destroy();
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment