Click or drag to resize
WeightedCollectionTGetWeightTItemWeight Method (T)
Gets the weight controller object of an item with specific controller type requested.

Namespace: JLChnToZ.LuckyPlayer.WeightedRandomizer
Assembly: LuckyPlayer (in LuckyPlayer.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
public TItemWeight GetWeight<TItemWeight>(
	T item
)
where TItemWeight : Object, IItemWeight<T>

Parameters

item
Type: T
The item

Type Parameters

TItemWeight
A type that implements weight controller interface.

Return Value

Type: TItemWeight
The weight controller object, null (or default value if type is valuetype such as structure) if item not found or type of weight controller does not match.
See Also