Exemplo n.º 1
0
        // Powerups
        public void AddPowerup(int type, double time = 0)
        {
            for (int i = 0; i < PowerupGUIItems.Count; i++)
            {
                if (PowerupGUIItems[i].Type == type)
                {
                    PowerupGUIItems[i].ResetTime(time);
                    return;
                }
            }

            PowerupGUI item = new PowerupGUI(this, type, time, Game.GraphicsMode);
            item.Y = Game.Size.Y - 40;
            PowerupGUIItems.Add(item);
            UpdatePowerupPositions();
            Layer_Powerups.AddChild(item);
        }
Exemplo n.º 2
0
        // Powerups
        public void AddPowerup(int type, double time = 0)
        {
            for (int i = 0; i < PowerupGUIItems.Count; i++)
            {
                if (PowerupGUIItems[i].Type == type)
                {
                    PowerupGUIItems[i].ResetTime(time);
                    return;
                }
            }

            PowerupGUI item = new PowerupGUI(this, type, time, Game.GraphicsMode);

            item.Y = Game.Size.Y - 40;
            PowerupGUIItems.Add(item);
            UpdatePowerupPositions();
            Layer_Powerups.AddChild(item);
        }