Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        public PowerUp CreatePowerup(Vector2 pos)
        {
            PowerUp newPowerup = powerupFactory.CreateRandomPowerUp(pos);

            return(newPowerup);
        }