示例#1
0
        public static void createButtons()
        {
            String[] spellButtons = new String[4];
            spellButtons[0] = "armored_swordman_attack";
            spellButtons[1] = "heal";
            spellButtons[2] = "airship_attack";
            spellButtons[3] = "shield1";

            int previousDestinationX = 0;

            for (int i = 0; i < 4; i++)
            {
                spellButton    = new SpellButton(new Vector2(0, 0), spellButtons[i]);
                spellButton.id = currentID + 1;

                if (previousDestinationX > 0)
                {
                    spellButton.destinationX = ((previousDestinationX + spellButton.hudElementSizeX + spellButton.offsetBetweenBars));
                }
                previousDestinationX = spellButton.destinationX;

                hudList.Add(spellButton);
            }
        }
 public SpellButtonRenderer(HUDObject spellbutton)
 {
     this.spellbutton = (SpellButton)spellbutton;
 }