public static ChunkEntity CreateChunk(IntVector3 position = default(IntVector3)) { var chunk = new ChunkEntity(); chunk.Initialise(position); return chunk; }
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; }
public AbstractBlock(ChunkEntity chunk, IntVector3 position) { Chunk = chunk; Position = position; Info = new BlockInfo(); }
public AirBlock(ChunkEntity chunk = null, IntVector3 position = default(IntVector3)) : base(chunk, position) { Info = new AirBlockInfo(); }
public GrassBlock(ChunkEntity chunk, IntVector3 position) : base(chunk, position) { }
public void DestroyChunk(ChunkEntity chunk) { chunk.Destroy(); Chunks[chunk.Position] = null; }