public PowerUp CreatePowerUp(Property.PowerupType pType, Vector2 position)
        {
            Texture2D powerup_texture = null;
            PowerUp   new_powerup;

            switch (pType)
            {
            case Property.PowerupType.Health:
                powerup_texture = Property.spriteDict["health"];
                break;

            case Property.PowerupType.OneUp:
                powerup_texture = Property.spriteDict["1up"];
                break;

            case Property.PowerupType.Bomb:
                powerup_texture = Property.spriteDict["bomb"];
                break;
            }
            new_powerup = new PowerUp(position, (float)1, pType, powerup_texture);
            return(new_powerup);
        }
Exemple #2
0
        public PowerUp CreatePowerup(Vector2 pos)
        {
            PowerUp newPowerup = powerupFactory.CreateRandomPowerUp(pos);

            return(newPowerup);
        }