예제 #1
0
        void RemoveUnitFromAliveUnits(UnitController unit)
        {
            CheckRemainingTeams();
            for (int i = 0; i < aliveHeroUnits.Count; i++)
            {
                if (unit == aliveHeroUnits[i])
                {
                    aliveHeroUnits.RemoveAt(i);
                    RemoveUnitFromEnemyTeamTargets(unit);
                    RemoveUnitFromHeroTeamTargets(unit);
                }
            }

            for (int i = 0; i < aliveEnemyUnits.Count; i++)
            {
                if (unit == aliveEnemyUnits[i])
                {
                    aliveEnemyUnits.RemoveAt(i);
                    RemoveUnitFromHeroTeamTargets(unit);
                }
            }

            CheckRemainingTeams();
        }
예제 #2
0
 public void RemoveTargetUnit(UnitController unit)
 {
     targetsBehaviour.RemoveTargetUnit(unit);
 }
예제 #3
0
 void UnitHasDied(UnitController deadUnit)
 {
     RemoveUnitFromAliveUnits(deadUnit);
 }
예제 #4
0
 public void RemoveTargetUnit(UnitController removedUnit)
 {
     targetUnits.Remove(removedUnit);
 }