C# 클래스 VoxelGame.Core.Logic.World

파일 보기 프로젝트 열기: pershingthesecond/VoxelGame 1 사용 예제들

Private Properties

프로퍼티 타입 설명
GetBlock BlockInstance?
GetContent System
GetLiquid LiquidInstance?
ModifyLiquid void
ModifyWorldData void
RetrieveContent void
SetBlock void
SetContent void
SetContent void
SetLiquid void
SetPosition void
Setup void
World System

공개 메소드들

메소드 설명
Dispose ( ) : void

Dispose of the world.

DoRandomUpdate ( Vector3i position ) : bool

Force a random update at a position.

FinishAll ( ) : Task

Wait for all world tasks to finish.

GetSpawnPosition ( ) : Vector3

Get the spawn position of this world.

Save ( ) : Task

Saves all active chunks that are not currently saved.

SetDefaultBlock ( Vector3i position ) : void

Set a position to the default block.

SetDefaultLiquid ( Vector3i position ) : void

Set a position to the default liquid.

SetSpawnPosition ( Vector3 position ) : void

Sets the spawn position of this world.

Update ( float deltaTime ) : void

Called every update cycle.

보호된 메소드들

메소드 설명
AddAllTasks ( List tasks ) : void

Add all tasks to the list. This is used to wait for all tasks to finish when calling FinishAll.

Dispose ( bool disposing ) : void

Dispose of the world.

ProcessChangedSection ( VoxelGame.Core.Logic.Chunk chunk, Vector3i position ) : void

Process that a section was changed.

World ( VoxelGame.Core.Logic.WorldInformation information, string path ) : System

This constructor is meant for worlds that already exist.

World ( string name, string path, int seed ) : System

This constructor is meant for worlds that are new.

비공개 메소드들

메소드 설명
GetBlock ( Vector3i position ) : BlockInstance?
GetContent ( Vector3i position ) : System
GetLiquid ( Vector3i position ) : LiquidInstance?
ModifyLiquid ( bool isStatic, Vector3i position ) : void
ModifyWorldData ( Vector3i position, uint clearMask, uint addMask ) : void
RetrieveContent ( Vector3i position, Block? &block, uint &data, Liquid? &liquid, LiquidLevel &level, bool &isStatic ) : void
SetBlock ( BlockInstance block, Vector3i position ) : void
SetContent ( Block block, uint data, VoxelGame.Core.Logic.Liquid liquid, LiquidLevel level, bool isStatic, Vector3i position, bool tickLiquid ) : void
SetContent ( BlockInstance block, LiquidInstance liquid, Vector3i position, bool tickLiquid ) : void
SetLiquid ( LiquidInstance liquid, Vector3i position ) : void
SetPosition ( Block block, uint data, VoxelGame.Core.Logic.Liquid liquid, LiquidLevel level, bool isStatic, Vector3i position ) : void
Setup ( ) : void
World ( VoxelGame.Core.Logic.WorldInformation information, string worldDirectory, string chunkDirectory, IWorldGenerator generator ) : System

Setup of readonly fields and non-optional steps.

메소드 상세

AddAllTasks() 보호된 메소드

Add all tasks to the list. This is used to wait for all tasks to finish when calling FinishAll.
protected AddAllTasks ( List tasks ) : void
tasks List The task list.
리턴 void

Dispose() 공개 메소드

Dispose of the world.
public Dispose ( ) : void
리턴 void

Dispose() 보호된 메소드

Dispose of the world.
protected Dispose ( bool disposing ) : void
disposing bool True when disposing intentionally.
리턴 void

DoRandomUpdate() 공개 메소드

Force a random update at a position.
public DoRandomUpdate ( Vector3i position ) : bool
position Vector3i The position.
리턴 bool

FinishAll() 공개 메소드

Wait for all world tasks to finish.
public FinishAll ( ) : Task
리턴 Task

GetSpawnPosition() 공개 메소드

Get the spawn position of this world.
public GetSpawnPosition ( ) : Vector3
리턴 Vector3

ProcessChangedSection() 보호된 추상적인 메소드

Process that a section was changed.
protected abstract ProcessChangedSection ( VoxelGame.Core.Logic.Chunk chunk, Vector3i position ) : void
chunk VoxelGame.Core.Logic.Chunk The chunk containing the section.
position Vector3i The position of the block that caused the section change.
리턴 void

Save() 공개 메소드

Saves all active chunks that are not currently saved.
public Save ( ) : Task
리턴 Task

SetDefaultBlock() 공개 메소드

Set a position to the default block.
public SetDefaultBlock ( Vector3i position ) : void
position Vector3i
리턴 void

SetDefaultLiquid() 공개 메소드

Set a position to the default liquid.
public SetDefaultLiquid ( Vector3i position ) : void
position Vector3i
리턴 void

SetSpawnPosition() 공개 메소드

Sets the spawn position of this world.
public SetSpawnPosition ( Vector3 position ) : void
position Vector3 The position to set as spawn.
리턴 void

Update() 공개 추상적인 메소드

Called every update cycle.
public abstract Update ( float deltaTime ) : void
deltaTime float The time since the last update cycle.
리턴 void

World() 보호된 메소드

This constructor is meant for worlds that already exist.
protected World ( VoxelGame.Core.Logic.WorldInformation information, string path ) : System
information VoxelGame.Core.Logic.WorldInformation
path string
리턴 System

World() 보호된 메소드

This constructor is meant for worlds that are new.
protected World ( string name, string path, int seed ) : System
name string
path string
seed int
리턴 System