|
WeightedCollectionTSetWeight Method (T, IItemWeightT) |
Binds the item with a dynamic weight controller
Namespace: JLChnToZ.LuckyPlayer.WeightedRandomizerAssembly: LuckyPlayer (in LuckyPlayer.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax public bool SetWeight(
T item,
IItemWeight<T> weight
)
Public Function SetWeight (
item As T,
weight As IItemWeight(Of T)
) As Boolean
public:
bool SetWeight(
T item,
IItemWeight<T>^ weight
)
member SetWeight :
item : 'T *
weight : IItemWeight<'T> -> bool
Parameters
- item
- Type: T
The item - weight
- Type: JLChnToZ.LuckyPlayer.WeightedRandomizerIItemWeightT
The dynamic weight controller
Return Value
Type:
Booleantrue if object found and bind successfully, otherwise
false.
Remarks If null is passed in weight, it will treat as immutable zero weight.
See Also