예제 #1
0
 public void ApplySolutionToMap(Grid3di map, int code)
 {
     foreach (Vec3di step in curPath)
     {
         map.SetAt(step.x, step.y, step.z, code);
     }
 }
예제 #2
0
 public void ApplyMap(Grid3di m, int z)
 {
     for (int y = 0; y < height; y++)
     {
         for (int x = 0; x < width; x++)
         {
             Tile t = tiles[y * width + x];
             t.code = m.GetAt(x, y, z, m.BorderCode);
         }
     }
 }
예제 #3
0
    protected virtual void OnStart()
    {
        srcGrid = new Grid3di();
        srcGrid.Resize(mapWidth, mapHeight, mapDepth);
        srcGrid.BorderCode = 99;

        resGrid = new Grid3di(mapWidth, mapHeight, mapDepth);

        agent.map         = srcGrid;
        agent.ownPosition = pathStart;

        pathNeedsUpdate = true;
    }