コード例 #1
0
        public Chunk(Vector3Int pos)
        {
            chunkPos = pos;
            Vector3Int chunkWorldPos = WorldHelper.ConvertFromChunkSpaceToWorldSpace(pos);

            Transform.Position = new Vector3(chunkWorldPos.X, chunkWorldPos.Y, chunkWorldPos.Z);
            generator          = new WorldGenerator(Transform.RoundedPosition);
        }
コード例 #2
0
 protected override void OnUpdateVirtual(float deltaTime)
 {
     GenerateAround(WorldHelper.ConvertFromWorldSpaceToChunkSpace(GameManager.Player.Transform.Position));
     QueueGeneratedChunks();
 }