Click or drag to resize
WeightedCollectionTSetWeight Method (T, IItemWeightT)
Binds the item with a dynamic weight controller

Namespace: JLChnToZ.LuckyPlayer.WeightedRandomizer
Assembly: LuckyPlayer (in LuckyPlayer.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
public bool SetWeight(
	T item,
	IItemWeight<T> weight
)

Parameters

item
Type: T
The item
weight
Type: JLChnToZ.LuckyPlayer.WeightedRandomizerIItemWeightT
The dynamic weight controller

Return Value

Type: Boolean
true if object found and bind successfully, otherwise false.
Remarks
If null is passed in weight, it will treat as immutable zero weight.
See Also