private void InitEdges() { GameManager.Instance.Reset(); WaterVoxelMass mass = this.SpawnWaterVoxelMass(); for (int i = 0; i <= 256; i += this.VoxelSize) { mass.AddVoxel(this.SpawnWaterVoxel(new Vector3(i, 0, 0))); mass.AddVoxel(this.SpawnWaterVoxel(new Vector3(i, 0, 256))); mass.AddVoxel(this.SpawnWaterVoxel(new Vector3(0, 0, i))); mass.AddVoxel(this.SpawnWaterVoxel(new Vector3(256, 0, i))); } }
private void BecomeWaterVoxelMass() { WaterVoxelMass mass = WaterVoxelManager.Instance.SpawnWaterVoxelMass(); WaterVoxel waterVoxel = WaterVoxelManager.Instance.SpawnWaterVoxel(this.transform.position); mass.AddVoxel(waterVoxel); ObjectPooler.Instance.Reclaim(this.gameObject); }