|
HelpersAddT Method (WeightedCollectionT, T, Double, Int32, Double) |
Namespace: JLChnToZ.LuckyPlayerAssembly: LuckyPlayer (in LuckyPlayer.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax public static LimitedLuckyController<T> Add<T>(
this WeightedCollection<T> collection,
T item,
double rare,
int initialAmount,
double baseRarity
)
<ExtensionAttribute>
Public Shared Function Add(Of T) (
collection As WeightedCollection(Of T),
item As T,
rare As Double,
initialAmount As Integer,
baseRarity As Double
) As LimitedLuckyController(Of T)
public:
[ExtensionAttribute]
generic<typename T>
static LimitedLuckyController<T>^ Add(
WeightedCollection<T>^ collection,
T item,
double rare,
int initialAmount,
double baseRarity
)
[<ExtensionAttribute>]
static member Add :
collection : WeightedCollection<'T> *
item : 'T *
rare : float *
initialAmount : int *
baseRarity : float -> LimitedLuckyController<'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. - initialAmount
- Type: SystemInt32
How many of the item initially have? - baseRarity
- Type: SystemDouble
Alterable base rarity value.
Type Parameters
- T
Return Value
Type:
LimitedLuckyControllerTUsage 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