/// <summary> /// Returns the enemy to the resource pool. /// </summary> public static void GiveBack(EnemyCannonBall cannonBall) { cannonBall.Destroy(); CannonBallPool.GiveBack(cannonBall); }
/// <summary> /// Enqueues a cannon ball to remove from the game. /// </summary> /// <param name="cannonBall">Cannon ball to remove from the world.</param> public void RemoveCannonBall(EnemyCannonBall cannonBall) { cannonBallsToRemove.Enqueue(cannonBall); }