示例#1
0
 public static TerrainAwarePathFinder TerrainAwarePather(this Map map)
 {
     if (!PatherLookup.TryGetValue(map, out TerrainAwarePathFinder pather))
     {
         pather = new TerrainAwarePathFinder(map);
         PatherLookup.Add(map, pather);
     }
     return(pather);
 }
示例#2
0
 public static void ResetLookup(this Map map)
 {
     // Always replace because tile ids get reused on game loads
     PatherLookup[map]    = new TerrainAwarePathFinder(map);
     TileLookup[map.Tile] = map;
 }