private void CheckAttackTarget()
 {
     if (cityState.GetUnits().ToList().FindAll(c => c.CurrentStance == CombatUnit.Stance.OFFENCE).Count >= 3)
     {
         List <City> enemyCities = cityState.GetEnemyCitiesOrderByDistance(cityState.GetCity().GetHexCell().coordinates);
         if (enemyCities.Count > 0)
         {
             attackTarget = enemyCities[0].GetHexCell();
         }
     }
 }
Beispiel #2
0
    public void CentreMap()
    {
        CityState cityState = humanPlayer.GetCityStates().FirstOrDefault();

        if (cityState)
        {
            hexMapCamera.MoveCamera(cityState.GetCity().GetHexCell());
        }
        else
        {
            Agent agent = humanPlayer.GetAgents().FirstOrDefault();
            if (agent)
            {
                hexMapCamera.MoveCamera(agent.HexUnit.Location);
            }
            else
            {
                HexMapCamera.ValidatePosition();
            }
        }
    }