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(); }
public void RemoveTargetUnit(UnitController unit) { targetsBehaviour.RemoveTargetUnit(unit); }
void UnitHasDied(UnitController deadUnit) { RemoveUnitFromAliveUnits(deadUnit); }
public void RemoveTargetUnit(UnitController removedUnit) { targetUnits.Remove(removedUnit); }