示例#1
0
        public static ChunkEntity CreateChunk(IntVector3 position = default(IntVector3))
        {
            var chunk = new ChunkEntity();

            chunk.Initialise(position);

            return chunk;
        }
示例#2
0
        public static ChunkEntity CreateFlatGrassChunk(IntVector3 position = default(IntVector3))
        {
            var chunk = new ChunkEntity();

            for (int x = 0; x < ChunkEntity.ChunkSize; x++)
            {
                for (int y = 0; y < ChunkEntity.ChunkSize; y++)
                {
                    for (int z = 0; z < ChunkEntity.ChunkSize; z++)
                    {
                        chunk.SetBlock(new GrassBlock(chunk, new IntVector3(x, y, z)));
                    }
                }
            }

            chunk.Initialise(position);

            return chunk;
        }
示例#3
0
 public AbstractBlock(ChunkEntity chunk, IntVector3 position)
 {
     Chunk = chunk;
     Position = position;
     Info = new BlockInfo();
 }
示例#4
0
 public AirBlock(ChunkEntity chunk = null, IntVector3 position = default(IntVector3)) : base(chunk, position)
 {
     Info = new AirBlockInfo();
 }
示例#5
0
 public GrassBlock(ChunkEntity chunk, IntVector3 position) : base(chunk, position) { }
示例#6
0
 public void DestroyChunk(ChunkEntity chunk)
 {
     chunk.Destroy();
     Chunks[chunk.Position] = null;
 }