예제 #1
0
 public GameArea GetAIRoutewayEndPoints(Architecture a, bool nowater)
 {
     GameArea area = new GameArea();
     if (!this.IsFriendly(a.BelongedFaction))
     {
         foreach (Point point in this.ContactArea.Area)
         {
             if (a.IsRoutewayPossible(point) && (!nowater || (base.Scenario.GetTerrainKindByPosition(point) != TerrainKind.水域)))
             {
                 area.AddPoint(point);
             }
         }
     }
     if (area.Count == 0)
     {
         foreach (Point point in this.GetRoutewayStartArea().Area)
         {
             if (a.IsRoutewayPossible(point) && (!nowater || (base.Scenario.GetTerrainKindByPosition(point) != TerrainKind.水域)))
             {
                 area.AddPoint(point);
             }
         }
     }
     if (area.Count == 0)
     {
         foreach (Point point in this.LongViewArea.Area)
         {
             if (a.IsRoutewayPossible(point))
             {
                 area.AddPoint(point);
             }
         }
     }
     return area;
 }