Protected
editProtected
totalAdd a series of entries to the PTable.
After adding all entries, the probability ranges will be re-intialized for all entries based on the change in the total weight of all entries added.
When adding lots of entries, you may want to look into PTable#populate.
Rest
...entries: PrePTableEntry<T>[]The set of precursor PTable entries to add.
Create a new PTable entry.
The value of the entry.
The weight of the entry.
Protected
initializeEnables edit mode, which disables re-initializing entry ranges with every addition.
Edit mode is only enabled during the call of the provided callback function, which is executed immediately.
After the callback function ends, edit mode is disabled.
A function called during edit mode.
A probability table is a set of items that have an assigned probability.
The goal of the probability table is to make it quick and easy to assign a set chance on multiple outcomes of a single event.