|
PlayerLuckHandleWithLuckT Method (WeightedCollectionT, Random) |
Gets a random item from the collection, and do further process for luckyness adjustment.
Namespace: JLChnToZ.LuckyPlayerAssembly: LuckyPlayer (in LuckyPlayer.dll) Version: 1.0.0.0 (1.0.0.0)
Syntaxpublic T HandleWithLuck<T>(
WeightedCollection<T> collection,
Random random = null
)
Public Function HandleWithLuck(Of T) (
collection As WeightedCollection(Of T),
Optional random As Random = Nothing
) As T
public:
generic<typename T>
T HandleWithLuck(
WeightedCollection<T>^ collection,
Random^ random = nullptr
)
member HandleWithLuck :
collection : WeightedCollection<'T> *
?random : Random
(* Defaults:
let _random = defaultArg random null
*)
-> 'T
Parameters
- collection
- Type: JLChnToZ.LuckyPlayer.WeightedRandomizerWeightedCollectionT
The collection pool - random (Optional)
- Type: SystemRandom
Optional randomizer
Type Parameters
- T
Return Value
Type:
TThe item selected
See Also