RandomTimer class inherits Timer class and adds alarming at random times between minimum and maximum time limits.
Inherits TaleWorlds.Core.Timer.
|
| RandomTimer (float gameTime, float durationMin, float durationMax) |
| Initializes a new instance of the RandomTimer class.
|
|
override bool | Check (float gameTime) |
| Checks if the required amount of time has passed or not. If it has passed, then the new random duration is set for the next alarm.
|
|
void | ChangeDuration (float min, float max) |
| Sets current min and max duration values and resets timer according to these values. This does not certainly main in next check this timer will tick. But next tick will be related to given min max values.
|
|
void | RecomputeDuration () |
| Resets duration value.
|
|
| Timer (float gameTime, float duration, bool autoReset=true) |
| Initializes a new instance of the Timer class.
|
|
virtual bool | Check (float gameTime) |
| Checks if the required amount of time has passed or not.
|
|
float | ElapsedTime () |
| Gets the amount of time that has passed since the timer has started for the next alarm.
|
|
void | Reset (float gameTime) |
|
void | Reset (float gameTime, float newDuration) |
|
void | AdjustStartTime (float deltaTime) |
|
|
float | Duration [get, protected set] |
| Duration after which the timer alarms.
|
|
float | PreviousDeltaTime [get] |
| The time elapsed before the alarm rang.
|
|
◆ RandomTimer()
TaleWorlds.MountAndBlade.RandomTimer.RandomTimer |
( |
float |
gameTime, |
|
|
float |
durationMin, |
|
|
float |
durationMax |
|
) |
| |
- Parameters
-
gameTime | Current time of the time type that will be used for checking. |
durationMin | Minimum duration value for random time selection. |
durationMax | Maximum duration value for random time selection. |
◆ Check()
override bool TaleWorlds.MountAndBlade.RandomTimer.Check |
( |
float |
gameTime | ) |
|
|
virtual |
- Parameters
-
gameTime | Current time of the time type that is used for checking. |
- Returns
- Returns true if the required amount of time has passed.
Reimplemented from TaleWorlds.Core.Timer.
◆ ChangeDuration()
void TaleWorlds.MountAndBlade.RandomTimer.ChangeDuration |
( |
float |
min, |
|
|
float |
max |
|
) |
| |
◆ RecomputeDuration()
void TaleWorlds.MountAndBlade.RandomTimer.RecomputeDuration |
( |
| ) |
|