• Dokumentation (master)
  • Dokumentation (develop)
Show / Hide Table of Contents
  • OctoAwesome
    • Axis
    • Block
    • BlockDefinition
    • Blocks
    • Chunk
    • ChunkColumn
    • Component
    • ComponentList<T>
    • Coordinate
    • Entity
    • EntityComponent
    • EntityFilterAttribute
    • EntityList
    • Extension
    • FailEntityChunkArgs
    • GlobalChunkCache
    • IBlockDefinition
    • IChunk
    • IChunkColumn
    • IClimateMap
    • IDefinition
    • IDefinitionManager
    • IEntityList
    • IExtension
    • IExtensionLoader
    • IExtensionResolver
    • IGlobalChunkCache
    • IInventoryableDefinition
    • IItem
    • IItemDefinition
    • ILocalChunkCache
    • IMapGenerator
    • IMapPopulator
    • Index2
    • Index3
    • InventorySlot
    • IPersistenceManager
    • IPlanet
    • IResource
    • IResourceManager
    • ISettings
    • Item
    • IUniverse
    • LocalBuilder
    • LocalChunkCache
    • MapPopulator
    • OrientationFlags
    • PhysicalProperties
    • Planet
    • PlanetIndex3
    • Player
    • Simulation
    • SimulationComponent
    • SimulationComponent<C1, C2, C3>
    • SimulationComponent<C1, C2>
    • SimulationComponent<C1>
    • SimulationState
    • Universe
    • UpdateableEntity
    • Wall
  • OctoAwesome.Basics
    • ITreeDefinition
    • TreeDefinition
  • OctoAwesome.EntityComponents
    • BodyComponent
    • ControllableComponent
    • HeadComponent
    • InventoryComponent
    • PositionComponent
    • RenderComponent
    • ToolBarComponent
  • OctoAwesome.Runtime
    • DefinitionManager
    • DiskPersistenceManager
    • ExtensionLoader
    • IPlayerController
    • ResourceManager

Class GlobalChunkCache

Globaler Cache für Chunks

Vererbung
System.Object
GlobalChunkCache
Implementiert
IGlobalChunkCache
Namespace: OctoAwesome
Assembly: OctoAwesome.dll
Syntax
public sealed class GlobalChunkCache : object, IGlobalChunkCache

Konstructoren

GlobalChunkCache(Func<Int32, Index2, IChunkColumn>, Func<Int32, IPlanet>, Action<Int32, Index2, IChunkColumn>)

Erzeugt eine neue Instaz der Klasse GlobalChunkCache

Deklaration
public GlobalChunkCache(Func<int, Index2, IChunkColumn> loadDelegate, Func<int, IPlanet> loadPlanetDelegate, Action<int, Index2, IChunkColumn> saveDelegate)
Parameter
Typ Name Beschreibung
Func<System.Int32, Index2, IChunkColumn> loadDelegate

Delegat, der nicht geladene ChunkColumns nachläd.

Func<System.Int32, IPlanet> loadPlanetDelegate
Action<System.Int32, Index2, IChunkColumn> saveDelegate

Delegat, der nicht mehr benötigte ChunkColumns abspeichert.

Eigenschaften

DirtyChunkColumn

Anzahl der noch nicht gespeicherten ChunkColumns.

Deklaration
public int DirtyChunkColumn { get; }
Wert der Eigenschaft
Typ Beschreibung
System.Int32

LoadedChunkColumns

Gibt die Anzahl der aktuell geladenen Chunks zurück.

Deklaration
public int LoadedChunkColumns { get; }
Wert der Eigenschaft
Typ Beschreibung
System.Int32

Methoden

AfterSimulationUpdate(Simulation)

Deklaration
public void AfterSimulationUpdate(Simulation simulation)
Parameter
Typ Name Beschreibung
Simulation simulation

BeforeSimulationUpdate(Simulation)

Deklaration
public void BeforeSimulationUpdate(Simulation simulation)
Parameter
Typ Name Beschreibung
Simulation simulation

Clear()

Löscht den gesamten Inhalt des Caches.

Deklaration
public void Clear()

GetPlanet(Int32)

Gibt einen Planenten anhand seiner ID zurück

Deklaration
public IPlanet GetPlanet(int id)
Parameter
Typ Name Beschreibung
System.Int32 id

ID des Planeten

R�ckgabewert
Typ Beschreibung
IPlanet

Planet

IsChunkLoaded(Int32, Index2)

Deklaration
public bool IsChunkLoaded(int planet, Index2 position)
Parameter
Typ Name Beschreibung
System.Int32 planet
Index2 position
R�ckgabewert
Typ Beschreibung
System.Boolean

Peek(Int32, Index2)

Liefert den Chunk, sofern geladen.

Deklaration
public IChunkColumn Peek(int planet, Index2 position)
Parameter
Typ Name Beschreibung
System.Int32 planet

Die Id des Planeten

Index2 position

Die Position des zurückzugebenden Chunks

R�ckgabewert
Typ Beschreibung
IChunkColumn

Chunk Instanz oder null, falls nicht geladen

Release(Int32, Index2, Boolean)

Gibt einen abonnierten Chunk wieder frei.

Deklaration
public void Release(int planet, Index2 position, bool passive)
Parameter
Typ Name Beschreibung
System.Int32 planet

Die Id des Planeten

Index2 position

Die Position des freizugebenden Chunks

System.Boolean passive

Subscribe(Int32, Index2, Boolean)

Abonniert einen Chunk.

Deklaration
public IChunkColumn Subscribe(int planet, Index2 position, bool passive)
Parameter
Typ Name Beschreibung
System.Int32 planet

Die Id des Planeten

Index2 position

Position des Chunks

System.Boolean passive
R�ckgabewert
Typ Beschreibung
IChunkColumn

Implementiert

IGlobalChunkCache
Nach oben Projekt OctoAwesome · Projektwebsite · Impressum · Datenschutzerklärung
Generated by DocFX