/// <summary> /// Factory method for spawning a shield /// </summary> /// <param name="shieldType">The type of shield to create</param> /// <param name="position">Position of the shield in the game world</param> /// <param name="PlayerShip">The Player</param> /// <returns>The game object id of the projectile</returns> public Shield CreateShield(ShieldType shieldType, Vector2 position, PlayerShip PlayerShip) { Shield shield; uint id = NextID(); switch (shieldType) { case ShieldType.EightBallShield: shield = new EightBallShield(id, content, position, PlayerShip); break; default: throw new NotImplementedException("EightBallShield failed."); } QueueGameObjectForCreation(shield); return(shield); }
/// <summary> /// Factory method for spawning a shield /// </summary> /// <param name="shieldType">The type of shield to create</param> /// <param name="position">Position of the shield in the game world</param> /// <param name="PlayerShip">The Player</param> /// <returns>The game object id of the projectile</returns> public Shield CreateShield(ShieldType shieldType, Vector2 position, PlayerShip PlayerShip) { Shield shield; uint id = NextID(); switch (shieldType) { case ShieldType.EightBallShield: shield = new EightBallShield(id, content, position, PlayerShip); break; default: throw new NotImplementedException("EightBallShield failed."); } shield.ObjectType = ObjectType.Shield; QueueGameObjectForCreation(shield); return shield; }