public override bool Equals(object obj)
{
ChunkPos pos;
return ((obj is ChunkPos) &&
((pos = (ChunkPos)obj).x == x) &&
(pos.y == y) && (pos.z == z));
}
/// <summary> /// Called by the player to update the chunk loader. /// </summary> public void updateChunkLoader() { ChunkPos playerPos = this.getOccupiedChunkPos(this.player.transform.position); if (!(playerPos.Equals(this.previousOccupiedChunkPos))) { this.loadChunks(playerPos); } this.previousOccupiedChunkPos = playerPos; this.unloadChunks(playerPos); this.generateChunksFromInstructions(this.maxBuildPerLoop); }