private void Convert(GameObject object) { Orb asOrb = (Orb) object; if (asOrb == null) return; Orb newOrb = new Orb(asOrb, true); converterContainer.AddGameObject(newOrb); object.Destroy(true); }
@Override public void InspectEvent(GameEvent event) { CollisionEventArgs cEventArgs = (CollisionEventArgs) event.args; if (cEventArgs == null) return; GameObject collider = event.dst; GameObject potentialConvert = event.src; if (converterCollisionObject != null && converterCollisionObject == collider) { ApplyWithoutCollisionCheck(potentialConvert); } else { // Check the whole group for the collider if (converterContainer.contains(collider)) ApplyWithoutCollisionCheck(potentialConvert); } }