Put this component in your scene and it'll catch MMFreezeFrameEvents and MMTimeScaleEvents, allowing you to control the flow of time.
More...
Inherits MoreMountains.Tools.MMSingleton< T >.
|
virtual void | PreInitialization () |
| We initialize our stack.
|
virtual void | Initialization () |
| On init we store our initial timescales and apply the normal timescale.
|
virtual void | ResetTimeScale () |
| Resets the time scale to the stored normal time scale.
|
virtual void | Unfreeze () |
| Resets the time scale to the last saved time scale.
|
virtual void | SetTimeScaleTo (float newNormalTimeScale) |
| Sets the time scale to the specified value, instantly.
|
virtual void | OnTimeScaleEvent (MMTimeScaleMethods timeScaleMethod, float timeScale, float duration, bool lerp, float lerpSpeed, bool infinite, MMTimeScaleLerpModes timeScaleLerpMode=MMTimeScaleLerpModes.Speed, MMTweenType timeScaleLerpCurve=null, float timeScaleLerpDuration=0.2f, bool timeScaleLerpOnUnfreeze=false, MMTweenType timeScaleLerpCurveOnUnfreeze=null, float timeScaleLerpDurationOnUnfreeze=0.2f) |
| Catches TimeScaleEvents and acts on them.
|
virtual void | OnMMFreezeFrameEvent (float duration) |
| When getting a freeze frame event we stop the time.
|
|
float | NormalTimeScale = 1f |
| The reference time scale, to which the system will go back to after all time is changed.
|
bool | UpdateTimescale = true |
| whether or not to update Time.timeScale when changing time scale
|
bool | UpdateFixedDeltaTime = true |
| whether or not to update Time.fixedDeltaTime when changing time scale
|
bool | UpdateMaximumDeltaTime = true |
| whether or not to update Time.maximumDeltaTime when changing time scale
|
float | CurrentTimeScale = 1f |
| the current, real time, time scale
|
float | TargetTimeScale = 1f |
| the time scale the system is lerping towards
|
bool | TestButton |
| a test button for the inspector
|
|
virtual void | TestButtonToSlowDownTime () |
| A method used from the inspector to test the system.
|
override void | Awake () |
| On start we initialize our stack.
|
virtual void | Start () |
| On Start we apply our timescale.
|
virtual void | Update () |
| On Update, applies the time scale and resets it if needed.
|
virtual void | ApplyTimeScale (float newValue) |
| Modifies the time scale and time attributes to match the new time scale.
|
virtual void | SetTimeScale (float newTimeScale) |
| Resets all stacked time scale changes and simply sets the time scale, until further changes.
|
virtual void | SetTimeScale (TimeScaleProperties timeScaleProperties) |
| Sets the time scale for the specified properties (duration, time scale, lerp or not, and lerp speed)
|
virtual void | InitializeSingleton () |
| Initializes the singleton.
|
Put this component in your scene and it'll catch MMFreezeFrameEvents and MMTimeScaleEvents, allowing you to control the flow of time.
◆ ApplyTimeScale()
virtual void MoreMountains.Feedbacks.MMTimeManager.ApplyTimeScale |
( |
float | newValue | ) |
|
|
protectedvirtual |
Modifies the time scale and time attributes to match the new time scale.
- Parameters
-
◆ Awake()
override void MoreMountains.Feedbacks.MMTimeManager.Awake |
( |
| ) |
|
|
protectedvirtual |
◆ Initialization()
virtual void MoreMountains.Feedbacks.MMTimeManager.Initialization |
( |
| ) |
|
|
virtual |
On init we store our initial timescales and apply the normal timescale.
◆ InitializeStatics()
void MoreMountains.Feedbacks.MMTimeManager.InitializeStatics |
( |
| ) |
|
|
staticprotected |
Statics initialization to support enter play modes.
◆ OnMMFreezeFrameEvent()
virtual void MoreMountains.Feedbacks.MMTimeManager.OnMMFreezeFrameEvent |
( |
float | duration | ) |
|
|
virtual |
When getting a freeze frame event we stop the time.
- Parameters
-
freezeFrameEvent | Freeze frame event. |
◆ OnTimeScaleEvent()
virtual void MoreMountains.Feedbacks.MMTimeManager.OnTimeScaleEvent |
( |
MMTimeScaleMethods | timeScaleMethod, |
|
|
float | timeScale, |
|
|
float | duration, |
|
|
bool | lerp, |
|
|
float | lerpSpeed, |
|
|
bool | infinite, |
|
|
MMTimeScaleLerpModes | timeScaleLerpMode = MMTimeScaleLerpModes::Speed, |
|
|
MMTweenType | timeScaleLerpCurve = null, |
|
|
float | timeScaleLerpDuration = 0::2f, |
|
|
bool | timeScaleLerpOnUnfreeze = false, |
|
|
MMTweenType | timeScaleLerpCurveOnUnfreeze = null, |
|
|
float | timeScaleLerpDurationOnUnfreeze = 0::2f ) |
|
virtual |
Catches TimeScaleEvents and acts on them.
- Parameters
-
◆ PreInitialization()
virtual void MoreMountains.Feedbacks.MMTimeManager.PreInitialization |
( |
| ) |
|
|
virtual |
◆ ResetTimeScale()
virtual void MoreMountains.Feedbacks.MMTimeManager.ResetTimeScale |
( |
| ) |
|
|
virtual |
Resets the time scale to the stored normal time scale.
◆ SetTimeScale() [1/2]
virtual void MoreMountains.Feedbacks.MMTimeManager.SetTimeScale |
( |
float | newTimeScale | ) |
|
|
protectedvirtual |
Resets all stacked time scale changes and simply sets the time scale, until further changes.
- Parameters
-
newTimeScale | New time scale. |
◆ SetTimeScale() [2/2]
virtual void MoreMountains.Feedbacks.MMTimeManager.SetTimeScale |
( |
TimeScaleProperties | timeScaleProperties | ) |
|
|
protectedvirtual |
Sets the time scale for the specified properties (duration, time scale, lerp or not, and lerp speed)
- Parameters
-
timeScaleProperties | Time scale properties. |
◆ SetTimeScaleTo()
virtual void MoreMountains.Feedbacks.MMTimeManager.SetTimeScaleTo |
( |
float | newNormalTimeScale | ) |
|
|
virtual |
Sets the time scale to the specified value, instantly.
- Parameters
-
newNormalTimeScale | New normal time scale. |
◆ Start()
virtual void MoreMountains.Feedbacks.MMTimeManager.Start |
( |
| ) |
|
|
protectedvirtual |
On Start we apply our timescale.
◆ TestButtonToSlowDownTime()
virtual void MoreMountains.Feedbacks.MMTimeManager.TestButtonToSlowDownTime |
( |
| ) |
|
|
protectedvirtual |
A method used from the inspector to test the system.
◆ Unfreeze()
virtual void MoreMountains.Feedbacks.MMTimeManager.Unfreeze |
( |
| ) |
|
|
virtual |
Resets the time scale to the last saved time scale.
◆ Update()
virtual void MoreMountains.Feedbacks.MMTimeManager.Update |
( |
| ) |
|
|
protectedvirtual |
On Update, applies the time scale and resets it if needed.
◆ _currentProperty
◆ _initialFixedDeltaTime
float MoreMountains.Feedbacks.MMTimeManager._initialFixedDeltaTime = 0f |
|
protected |
◆ _initialMaximumDeltaTime
float MoreMountains.Feedbacks.MMTimeManager._initialMaximumDeltaTime = 0f |
|
protected |
◆ _initialTimeScale
float MoreMountains.Feedbacks.MMTimeManager._initialTimeScale = 1f |
|
protected |
◆ _lerpingBackToNormal
bool MoreMountains.Feedbacks.MMTimeManager._lerpingBackToNormal = false |
|
protected |
◆ _resetProperty
◆ _startedAt
float MoreMountains.Feedbacks.MMTimeManager._startedAt |
|
protected |
◆ _timeScaleLastTime
float MoreMountains.Feedbacks.MMTimeManager._timeScaleLastTime = float.NegativeInfinity |
|
protected |
◆ _timeScaleProperties
◆ CurrentTimeScale
float MoreMountains.Feedbacks.MMTimeManager.CurrentTimeScale = 1f |
the current, real time, time scale
◆ NormalTimeScale
float MoreMountains.Feedbacks.MMTimeManager.NormalTimeScale = 1f |
The reference time scale, to which the system will go back to after all time is changed.
◆ TargetTimeScale
float MoreMountains.Feedbacks.MMTimeManager.TargetTimeScale = 1f |
the time scale the system is lerping towards
◆ TestButton
bool MoreMountains.Feedbacks.MMTimeManager.TestButton |
a test button for the inspector
◆ UpdateFixedDeltaTime
bool MoreMountains.Feedbacks.MMTimeManager.UpdateFixedDeltaTime = true |
whether or not to update Time.fixedDeltaTime when changing time scale
◆ UpdateMaximumDeltaTime
bool MoreMountains.Feedbacks.MMTimeManager.UpdateMaximumDeltaTime = true |
whether or not to update Time.maximumDeltaTime when changing time scale
◆ UpdateTimescale
bool MoreMountains.Feedbacks.MMTimeManager.UpdateTimescale = true |
whether or not to update Time.timeScale when changing time scale
The documentation for this class was generated from the following file:
- H:/Code/MoreMountains/InventoryEngineStore/Assets/InventoryEngine/MMTools/Core/MMTimeManager/MMTimeManager.cs