Exemplo n.º 1
0
 public void PrepForCache(float scale, int subdivisions)
 {
     if (tiles == null || tiles.Count == 0)
     {
         neighborInit = false;
         PolySphere sphere = new PolySphere(Vector3.zero, scale, subdivisions);
         //make the tileToPlate dict
         tileToPlate = new Dictionary <int, int>();
         CacheHexes(sphere);
         //CacheTriangles(sphere);
     }
     else
     {
         Debug.Log("tiles not null during cache prep");
     }
 }
Exemplo n.º 2
0
 public void PrepForCache(float scale, int subdivisions)
 {
     if (tiles == null || tiles.Count == 0)
     {
         Debug.Log("creating new world cache. Scale:" + scale + " Subs: " + subdivisions);
         neighborInit = false;
         PolySphere sphere = new PolySphere(Vector3.zero, scale, subdivisions);
         //make the tileToPlate dict
         numberOfPlates = sphere.numberOfPlates;
         //tileToPlate = new Dictionary<int, int>();
         CacheHexes(sphere);
         //CacheTriangles(sphere);
     }
     else
     {
         Debug.Log("tiles not null during cache prep");
     }
 }
Exemplo n.º 3
0
 public void CacheHexes(PolySphere s) // Executed by the cacher.  @CHANGE: Now directly converting spheretiles to hextiles
 {
     tiles        = new List <HexTile>(s.hexTiles);
     neighborInit = false;
 }
Exemplo n.º 4
0
 public void CacheTriangles(PolySphere s)
 {
     triTiles = new List <TriTile>(s.triTiles);
 }