Ejemplo n.º 1
0
        public void show_attack_range(int id)
        {
            Game_Unit unit = units[id];

            lock (Move_Range_Lock)
            {
                Attack_Range.UnionWith(unit.attack_range);
                //Attack_Range = Attack_Range.Distinct().ToList(); //ListOrEquals //HashSet
                Staff_Range.UnionWith(unit.staff_range);
                //Staff_Range = Staff_Range.Distinct().ToList(); //ListOrEquals //HashSet

                //Attack_Range = Attack_Range.Except(Talk_Range).ToList();
                //Attack_Range = Attack_Range.Except(Move_Range).ToList();
                //Staff_Range = Staff_Range.Except(Talk_Range).ToList();
                //Staff_Range = Staff_Range.Except(Move_Range).ToList();
                //Staff_Range = Staff_Range.Except(Attack_Range).ToList();
                Attack_Range.ExceptWith(Talk_Range); //HashSet
                Attack_Range.ExceptWith(Move_Range);
                Staff_Range.ExceptWith(Talk_Range);
                Staff_Range.ExceptWith(Move_Range);
                Staff_Range.ExceptWith(Attack_Range);

                //@Debug: why
                //Selected_Move_Total = 0;
            }
        }
Ejemplo n.º 2
0
        public void clear_move_range(bool resetMoveArrow = true)
        {
            lock (Move_Range_Lock)
            {
                Move_Range.Clear();
                Attack_Range.Clear();
                Staff_Range.Clear();
                Talk_Range.Clear();

                if (resetMoveArrow)
                {
                    Move_Arrow.Clear();
                    Selected_Move_Total = 0;
                }
            }
        }