Random Events Manager
Presented by IRandomEventsManager interface, this system works with random events and provides such mechanisms like Bad Luck Protection and Good Luck Protection for them.
To use this system, inject IRandomEventsManager interface into your class, as shown below:
Parameters in inspector
possibleEvents – reference to scriptable object which contains a collection of possible random events.
Available methods
This method attempts to fire random event with certain eventType. Returns true if attempt was successful and event has occurred.
Example:
This method attempts to fire random event described in eventInfo. Returns true if attempt was successful and event has occurred.
Example:
This method resets random event chance (cancels all modifiers applied by Bad Luck Protection and Good Luck Protection logics).
Example:
This method returns current chance of eventType event occurance.
Example:
Last updated