private void Update() { float distanceMoved = Vector2.Distance(new Vector2(lastPosition.x, lastPosition.z), new Vector2(transform.position.x, transform.position.z)); if (distanceMoved > reloadChunkDistance) { lastPosition = transform.position; StartCoroutine(world.LoadChunks(transform.position, loadDistance)); } if (Input.GetMouseButtonDown(0)) { modify.ReplaceBlockCenter(10, -.0000000001f); } if (Input.GetMouseButtonDown(1)) { modify.AddBlockCenter(10, .00000000001f); } }
public void CreateBlock() { modifyTerrian.AddBlockCenter(SelectBlock.GetCurBlock()); audio.PlayOneShot(blockPickSound, 1.0f); modifyTerrian.StartLoadChunks(); }