Ejemplo n.º 1
0
 public Chunk(Vector3 position, Material material, byte ID)
 {
     indexID   = ID;
     this.mesh = new Mesh();
     chunk     = ChunkPool.SpawnGameObject();
     chunk.SetActive(false);
     chunk.name = string.Concat("Chunk: ", position.ToString());
     chunk.transform.position = new Vector3(position.x, 0, position.z);
     chunk.GetComponent <MeshRenderer>().material = material;
     meshFilter = chunk.GetComponent <MeshFilter>();
     toUpdate   = true;
 }