Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Debug.Log ("Generating a "+Mathf.RoundToInt((RenderDist*2)/width)*width+"x"+Mathf.RoundToInt((RenderDist*2)/height)*height);
- Grid = new RollingGrid<Chunk> (Mathf.RoundToInt((RenderDist*2)/width)*width, Mathf.RoundToInt((RenderDist*2)/height)*height);
- for(int y = 0; y < Grid.Height(); y++) {
- for(int x = 0; x < Grid.Width(); x++) {
- int ID = (y*width)+Mathf.RoundToInt(x/width);
- //Debug.Log("Grid["+x+","+y+"]: Set to ID "+ID);
- Grid[x,y] = new Chunk(ID);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment