ByChance.Configuration.Parameters.ChunkDistribution.GetEffectiveWeight C# (CSharp) Method

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
        public int GetEffectiveWeight(Context freeLevelContext, Context chunkCandidateContext, object level)
        {
            return chunkCandidateContext.Source.Weight;
        }
ChunkDistribution