예제 #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);
        }
예제 #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);
        }