ChunkContentManager
An abstract class in Root.Township, Alta.Chunks.
Base for what loads and unloads a chunk's contents. Tracks the wanted state and runs one load or unload at a time; subclasses include server, client, static and dynamic managers.
- Listed in World, chunks and saving
- Derived types
ClientChunkContentManager,DynamicChunkContentManager,EmptyChunkContentManager,ServerChunkContentManager,StaticChunkContentManager
Constructors
| Member | What it is |
|---|---|
ChunkContentManager(Chunk chunk) | Creates a ChunkContentManager from chunk. |
Fields
| Member | What it is |
|---|---|
protected Task loadTask | The running load task, or null. |
protected Task unloadTask | The running unload task, or null. |
Properties
| Member | What it is |
|---|---|
Chunk Chunk { get; private set; } | The chunk whose contents this manages. |
ContentState CurrentProcess { get; protected set; } | The state the manager is working towards or has reached. |
ContentState DesiredState { get; private set; } | The state last asked for with Load or Unload. |
virtual bool IsAllowingUnload { get; } | Whether the contents may be unloaded now. True by default. |
bool IsTransitioning { get; } | True while a load or unload task is running. |
Events
| Member | What it is |
|---|---|
event Action<Chunk> Loaded | Raised when loading finishes and loaded is still the wanted state. |
event Action<Chunk> Unloaded | Raised when unloading finishes and unloaded is still the wanted state. |
Methods
Used in
Members of other types that take, return or hold a ChunkContentManager: