Ejemplo n.º 1
0
        public bool allTeamUnitsDead(AllianceType alliance)
        {
            int numberofTeamUnits = 0;

            foreach (UnitModel unit in _worldModel.GetAllUnits().Where((UnitModel unit) => unit.Alliance == alliance))
            {
                numberofTeamUnits++;
                if (unit.AliveState.Value == UnitModel.AliveStateFlag.Alive)
                {
                    return(false);
                }
            }
            if (numberofTeamUnits > 0)
            {
                return(true);
            }
            else
            {
                Debug.Log(numberofTeamUnits + alliance.ToString());
                return(false);
            }
        }