WeightedCollectionT Methods |
The WeightedCollectionT generic type exposes the following members.
Name | Description | |
---|---|---|
Add(T) |
Adds an item into the pool with default weight.
|
|
Add(T, IItemWeightT) |
Adds an item into the pool with dynamic weight definition.
|
|
Add(T, Double) |
Adds an item into the pool with static weight.
|
|
AddRange |
Batch add items into the pool
|
|
Clear |
Removes everything from the pool.
|
|
Clone |
Creates a copy of current pool.
|
|
Contains |
Is the pool contains the specified item?
|
|
CopyTo |
Copy the pool of items into an array starting from arrayIndex.
|
|
Equals |
Determines whether the specified object is equal to the current object. (Inherited from Object.) |
|
Finalize |
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) |
|
GetCurrentWeight |
Gets the weight of an item. If dynamic object is defined, the value will be fetched immediately.
|
|
GetEnumerator |
Gets an enumerator object for iterates through every items in the pool, even the weight is zero.
|
|
GetHashCode |
Serves as the default hash function. (Inherited from Object.) |
|
GetLargeAmountRandomItems |
Get large amount of items from the pool. Assumes all weights are static.
|
|
GetRandomItem(Double) |
Get an item from the pool with random value passed.
|
|
GetRandomItem(Random) |
Get a random item from the pool.
|
|
GetType |
Gets the Type of the current instance. (Inherited from Object.) |
|
GetWeight(T) |
Gets the weight controller object of an item.
|
|
GetWeightTItemWeight(T) |
Gets the weight controller object of an item with specific controller type requested.
|
|
MemberwiseClone |
Creates a shallow copy of the current Object. (Inherited from Object.) |
|
Remove |
Removes an item from the pool.
|
|
RemoveRange |
Batch remove items from the pool. (if exists)
|
|
SetWeight(T, IItemWeightT) |
Binds the item with a dynamic weight controller
|
|
SetWeight(T, Double) |
Sets a static weight of an item.
|
|
ToString |
Returns a string that represents the current object. (Inherited from Object.) |
Name | Description | |
---|---|---|
AddT(T, Double, Double) | Overloaded.
Adds an item with a new LuckyControllerT binds with it.
(Defined by Helpers.) |
|
AddT(T, Double, Int32, Double) | Overloaded.
Adds an item with a new LimitedLuckyControllerT with it.
(Defined by Helpers.) |
|
ResetFineTuneWeightT |
Resets all fine tune weight to 1.
(Defined by Helpers.) |
|
ScaleFineTuneWeightT |
Scales all fine tune weight based on 1.
(Defined by Helpers.) |