C# Class ByChance.Configuration.Parameters.ChunkDistribution

Specifies the distribution of chunk templates within a level.
Inheritance: IChunkDistribution
Show file Open project: npruehs/bychance

Public Methods

Method Description
GetEffectiveWeight ( Context freeLevelContext, Context chunkCandidateContext, object level ) : int

Gets the effective weight of a chunk.

Most simple implementation is to just return the weight of the chunk candidate to which chunkCandidateContext belongs to. freeLevelContext and level are passed for custom implementations by clients.

Method Details

GetEffectiveWeight() public method

Gets the effective weight of a chunk.

Most simple implementation is to just return the weight of the chunk candidate to which chunkCandidateContext belongs to. freeLevelContext and level are passed for custom implementations by clients.

public GetEffectiveWeight ( Context freeLevelContext, Context chunkCandidateContext, object level ) : int
freeLevelContext ByChance.Core.Context Open context of the existing chunk to which the new chunk candidate will be attached to.
chunkCandidateContext ByChance.Core.Context Open context of the chunk candidate.
level object Current generated level.
return int