Пример #1
0
        public static void setMaterial(Vector3 hitpoint, byte value, float dist)
        {
            for (int i = 0; i < ActiveChunks.Count; i++)
            {
                VoxelChunk chunk = ActiveChunks[i];

                if (chunk.SetMaterial(hitpoint, value, dist))
                {
                    //Create the voxel data
                    //set various flags so the engine knows it needs to create a new mesh for terrain
                    chunk.hascollider = false;
                    EditedActions.Enqueue(chunk.CreateVertices);
                }
            }
        }