コード例 #1
0
 public OctreeNode(byte blockSize, BlockData data, int level, Vector3 origin)
 {
     this.blockSize = blockSize;
     this.blockData = data;
     this.origin = origin;
     this.subNodes = null;
     this.level = level;
 }
コード例 #2
0
 public OctreeNode(byte blockSize, int blockID, int level, Vector3 origin)
 {
     this.blockSize = blockSize;
     this.blockData = new BlockData(blockID);
     this.origin = origin;
     this.subNodes = null;
     this.level = level;
 }
コード例 #3
0
ファイル: Chunk.cs プロジェクト: eweilow/Forgotten-Voxels
 public void SetBlockdata(int x, int y, int z, BlockData blockData)
 {
     if (storage != null) {
         storage.SetBlockData(x,y,z,blockData);
     }
 }
コード例 #4
0
        // Dispose(bool disposing) executes in two distinct scenarios.
        // If disposing equals true, the method has been called directly
        // or indirectly by a user's code. Managed and unmanaged resources
        // can be disposed.
        // If disposing equals false, the method has been called by the
        // runtime from inside the finalizer and you should not reference
        // other objects. Only unmanaged resources can be disposed.
        protected virtual void Dispose(bool disposing)
        {
            // Check to see if Dispose has already been called.
            if(!this.disposed)
            {
                // If disposing equals true, dispose all managed
                // and unmanaged resources.
                if(disposing)
                {
                    // Dispose managed resources.
                    subNodes = null;
                    parent = null;
                    blockData = null;
                }
                // Note disposing has been done.
                disposed = true;

            }
        }
コード例 #5
0
 public void SetBlockData( int x, int y, int z, BlockData data)
 {
     GetNode(x, y, z, true).blockData = data;
 }