/// <summary> /// This code Disposes the sphere, body and gameNode of the playerModel object. /// </summary> public override void Dispose() { if (sphere != null) { sphere.Dispose(); } if (body != null) { body.Dispose(); } if (gameNode != null) { gameNode.Dispose(); } if (powerCells != null) { powerCells.Dispose(); } Physics.RemovePhysObj(physObj); physObj = null; }
/// <summary> /// Disposes of the enemy model. /// </summary> virtual protected void Dispose() { if (enemy != null) { enemy.Dispose(); } }
/// <summary> /// Disposes of the physics and the model. /// </summary> public override void Dispose() { Physics.RemovePhysObj(physObj); physObj = null; gameNode.Parent.RemoveChild(lifePuModel.GameNode); lifePuModel.GameNode.DetachAllObjects(); lifePuModel.GameNode.Dispose(); lifePuModel.Dispose(); }
/// <summary> /// This disposes the components of the bomb gun. /// </summary> public override void Dispose() { if (bombGun != null) { bombGun.Dispose(); } if (gameNode != null) { gameNode.Dispose(); } }
/// <summary> /// Disposes of the model and the game node. /// </summary> virtual protected void Dispose() { if (cannonGun != null) { cannonGun.Dispose(); } if (gameNode != null) { gameNode.Dispose(); } }
/// <summary> /// Disposes the model, physics and gameNode. /// </summary> virtual protected void Dispose() { if (cannonBall != null) { cannonBall.Dispose(); } if (gameNode != null) { gameNode.Dispose(); } Physics.RemovePhysObj(physObj); physObj = null; }