Exemple #1
0
        private void AddAbility(Ability ability, Vector2 off)
        {
            AbilityDisplay element = new AbilityDisplay(ability);

            element.Left.Set((int)off.X - 16, 0);
            element.Top.Set((int)off.Y - 16, 0);
            element.Width.Set(32, 0);
            element.Height.Set(32, 0);
            Append(element);
        }
        public static Dictionary <Type, Vector2> abilityIconPositions = new Dictionary <Type, Vector2>(); //to easily communicate ability icon positions to other UI

        private void AddAbility(Ability ability, Vector2 off)
        {
            AbilityDisplay element = new AbilityDisplay(ability);

            element.Left.Set((int)off.X - 16, 0);
            element.Top.Set((int)off.Y - 16, 0);
            element.Width.Set(32, 0);
            element.Height.Set(32, 0);
            Append(element);

            abilityIconPositions.Add(ability.GetType(), new Vector2(off.X, off.Y));
        }