// Update is called once per frame void Update() { if (!skipframe) { vp = voxelPlanet.instance; if (Input.GetMouseButton(0)) { dig = true; } if (Input.GetMouseButton(1)) { place = true; } if (dig) { skipframe = true; int[] coords = findVoxelCoords(); //print("trying (" + coords[0] + ", " + coords[1] + ", " + coords[2] + ")"); vp.dig(coords[0], coords[1], coords[2], 0); dig = false; } else if (place) { skipframe = true; int[] coords = findVoxelCoords(); //print("trying (" + coords[0] + ", " + coords[1] + ", " + coords[2] + ")"); vp.dig(coords[0], coords[1], coords[2], 1); place = false; } } skipframe = false; }
// Update is called once per frame void Update() { if (!skipframe) { vp = voxelPlanet.instance; if (Input.GetMouseButton(0)) dig = true; if (Input.GetMouseButton(1)) place = true; if (dig) { skipframe = true; int[] coords = findVoxelCoords(); //print("trying (" + coords[0] + ", " + coords[1] + ", " + coords[2] + ")"); vp.dig(coords[0], coords[1], coords[2], 0); dig = false; } else if (place) { skipframe = true; int[] coords = findVoxelCoords(); //print("trying (" + coords[0] + ", " + coords[1] + ", " + coords[2] + ")"); vp.dig(coords[0], coords[1], coords[2], 1); place = false; } } skipframe = false; }