|
HelpersAddT Method (WeightedCollectionT, T, Double, Double) |
Namespace: JLChnToZ.LuckyPlayerAssembly: LuckyPlayer (in LuckyPlayer.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax public static LuckyController<T> Add<T>(
this WeightedCollection<T> collection,
T item,
double rare,
double baseRarity
)
<ExtensionAttribute>
Public Shared Function Add(Of T) (
collection As WeightedCollection(Of T),
item As T,
rare As Double,
baseRarity As Double
) As LuckyController(Of T)
public:
[ExtensionAttribute]
generic<typename T>
static LuckyController<T>^ Add(
WeightedCollection<T>^ collection,
T item,
double rare,
double baseRarity
)
[<ExtensionAttribute>]
static member Add :
collection : WeightedCollection<'T> *
item : 'T *
rare : float *
baseRarity : float -> LuckyController<'T>
Parameters
- collection
- Type: JLChnToZ.LuckyPlayer.WeightedRandomizerWeightedCollectionT
The collection to add the item to - item
- Type: T
The item - rare
- Type: SystemDouble
The rarity which will affects the player's luckyness. - baseRarity
- Type: SystemDouble
Alterable base rarity value.
Type Parameters
- T
Return Value
Type:
LuckyControllerTUsage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
WeightedCollectionT. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
See Also