|
PlayerLuckHandleWithLuckT Method (WeightedCollectionT, Double) |
Gets a random item from the collection from random value given by caller, and do further process for luckyness adjustment.
Namespace: JLChnToZ.LuckyPlayerAssembly: LuckyPlayer (in LuckyPlayer.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax public T HandleWithLuck<T>(
WeightedCollection<T> collection,
double randomValue
)
Public Function HandleWithLuck(Of T) (
collection As WeightedCollection(Of T),
randomValue As Double
) As T
public:
generic<typename T>
T HandleWithLuck(
WeightedCollection<T>^ collection,
double randomValue
)
member HandleWithLuck :
collection : WeightedCollection<'T> *
randomValue : float -> 'T
Parameters
- collection
- Type: JLChnToZ.LuckyPlayer.WeightedRandomizerWeightedCollectionT
The collection pool - randomValue
- Type: SystemDouble
The random value generated by caller
Type Parameters
- T
Return Value
Type:
TThe item selected
Remarks This overloaded method is for more advanced uses, which require callers to generate the random number by themself then passing it in.
See Also