Ejemplo n.º 1
0
        private bool updateWidgetInput(Player player)
        {
            bool             flag = false;
            IAttributeWidget selectedAttribute = SelectedAttribute;

            if (uiDelay == 0)
            {
                if (parentUI.IsDownButtonDown() && selectedAttribute.SelectDown())
                {
                    flag = true;
                }
                if (parentUI.IsUpButtonDown() && selectedAttribute.SelectUp())
                {
                    flag = true;
                }
                if (parentUI.IsLeftButtonDown() && selectedAttribute.SelectLeft())
                {
                    flag = true;
                }
                if (parentUI.IsRightButtonDown() && selectedAttribute.SelectRight())
                {
                    flag = true;
                }
            }
            if (flag)
            {
                selectedAttribute.Apply(player);
            }
            return(flag);
        }
Ejemplo n.º 2
0
        public void ApplyDefaultAttributes(Player player)
        {
            Randomize(player);
            IAttributeWidget attributeWidget = attributes[9];

            attributeWidget.Reset();
            attributeWidget.Apply(player);
            categoryWidget.SelectedIndex = 0;
            UpdateHeaderAndFooter();
        }
Ejemplo n.º 3
0
 public void Randomize(Player player)
 {
     Vector2i[] array = RandomCharacter.create(rnd);
     for (int i = 0; i < attributes.Length; i++)
     {
         if (i != 9)
         {
             IAttributeWidget attributeWidget = attributes[i];
             attributeWidget.SetCursor(array[i]);
             attributeWidget.Apply(player);
         }
     }
 }