Table of Contents

Class ChunkedDecorations<TChunk>

Namespace
Root
Assembly
SPZGameAssembly.dll
public class ChunkedDecorations<TChunk> where TChunk : ChunkedDecorationsChunk, new()

Type Parameters

TChunk
Inheritance
object
ChunkedDecorations<TChunk>
Extension Methods

Constructors

ChunkedDecorations(float, float, float, float, float, int, ChunkInitializer, ChunkCleaner, ChunkDrawer)

public ChunkedDecorations(float chunkStartHeight_W, float chunkEndHeight_W, float chunkSize_W, float chunkBoundsPadding_W, float chunkBoundsVerticalPadding_W, int maxChunkCount, ChunkedDecorations<TChunk>.ChunkInitializer initChunk, ChunkedDecorations<TChunk>.ChunkCleaner cleanupChunk, ChunkedDecorations<TChunk>.ChunkDrawer drawChunk)

Parameters

chunkStartHeight_W float
chunkEndHeight_W float
chunkSize_W float
chunkBoundsPadding_W float
chunkBoundsVerticalPadding_W float
maxChunkCount int
initChunk ChunkedDecorations<TChunk>.ChunkInitializer
cleanupChunk ChunkedDecorations<TChunk>.ChunkCleaner
drawChunk ChunkedDecorations<TChunk>.ChunkDrawer

Fields

ChunkList

protected List<TChunk> ChunkList

Field Value

List<TChunk>

ChunkLookup_DC

protected Dictionary<int2, TChunk> ChunkLookup_DC

Field Value

Dictionary<int2, TChunk>

CleanupChunk

protected ChunkedDecorations<TChunk>.ChunkCleaner CleanupChunk

Field Value

ChunkedDecorations<TChunk>.ChunkCleaner

DrawChunk

protected ChunkedDecorations<TChunk>.ChunkDrawer DrawChunk

Field Value

ChunkedDecorations<TChunk>.ChunkDrawer

InitChunk

protected ChunkedDecorations<TChunk>.ChunkInitializer InitChunk

Field Value

ChunkedDecorations<TChunk>.ChunkInitializer

MaxDrawnChunkCount

protected int MaxDrawnChunkCount

Field Value

int

Properties

ChunkBoundsPadding_W

public float ChunkBoundsPadding_W { get; protected set; }

Property Value

float

ChunkBoundsVerticalPadding_W

public float ChunkBoundsVerticalPadding_W { get; protected set; }

Property Value

float

ChunkEndHeight_W

public float ChunkEndHeight_W { get; protected set; }

Property Value

float

ChunkSize_W

public float ChunkSize_W { get; protected set; }

Property Value

float

ChunkStartHeight_W

public float ChunkStartHeight_W { get; protected set; }

Property Value

float

Methods

Clear()

public void Clear()

DC_From_G(GlobalTileCoordinate)

protected int2 DC_From_G(GlobalTileCoordinate tile_G)

Parameters

tile_G GlobalTileCoordinate

Returns

int2

Draw(FrameDrawOptions)

public void Draw(FrameDrawOptions options)

Parameters

options FrameDrawOptions

GarbageCollect()

public void GarbageCollect()

GenerateChunkBounds(in WorldCoordinate, ref Bounds)

protected void GenerateChunkBounds(in WorldCoordinate center_W, ref Bounds bounds)

Parameters

center_W WorldCoordinate
bounds Bounds

GenerateChunkCoordinates(int2, out WorldCoordinate, out WorldCoordinate)

protected void GenerateChunkCoordinates(int2 tile_DC, out WorldCoordinate start_W, out WorldCoordinate center_W)

Parameters

tile_DC int2
start_W WorldCoordinate
center_W WorldCoordinate

GetOrCreateChunkAt_DC(int2)

protected TChunk GetOrCreateChunkAt_DC(int2 tile_DC)

Parameters

tile_DC int2

Returns

TChunk

Init()

public void Init()

W_From_DC(int2, float)

protected WorldCoordinate W_From_DC(int2 tile_DC, float layer = 0)

Parameters

tile_DC int2
layer float

Returns

WorldCoordinate