Example #1
0
        public static void EndTurn()
        {
            TacticsMovement unit = turnTeam.Dequeue();

            unit.EndTurn();

            if (turnTeam.Count > 0)
            {
                StartTurn();
            }
            else
            {
                string team = turnKey.Dequeue();
                turnKey.Enqueue(team);
                InitTeamTurnQueue();
            }
        }
Example #2
0
        public static void AddUnit(TacticsMovement unit)
        {
            List <TacticsMovement> list;

            if (!units.ContainsKey(unit.tag))
            {
                list            = new List <TacticsMovement>();
                units[unit.tag] = list;

                if (!turnKey.Contains(unit.tag))
                {
                    turnKey.Enqueue(unit.tag);
                }
            }
            else
            {
                list = units[unit.tag];
            }

            list.Add(unit);
        }