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"); } }
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"); } }
public void CacheHexes(PolySphere s) // Executed by the cacher. @CHANGE: Now directly converting spheretiles to hextiles { tiles = new List <HexTile>(s.hexTiles); neighborInit = false; }
public void CacheTriangles(PolySphere s) { triTiles = new List <TriTile>(s.triTiles); }