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< MMTimeManager >.
|
virtual void | PreInitialization () |
| We initialize our stack More...
|
|
virtual void | Initialization () |
| On init we store our initial timescales and apply the normal timescale More...
|
|
virtual void | SetTimeScaleTo (float newNormalTimeScale) |
| Sets the time scale to the specified value, instantly More...
|
|
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 timeScaleLerpOnReset=false, MMTweenType timeScaleLerpCurveOnReset=null, float timeScaleLerpDurationOnReset=0.2f) |
| Catches TimeScaleEvents and acts on them More...
|
|
virtual void | OnMMFreezeFrameEvent (float duration) |
| When getting a freeze frame event we stop the time More...
|
|
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()
static 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 |
timeScaleLerpOnReset = false , |
|
|
MMTweenType |
timeScaleLerpCurveOnReset = null , |
|
|
float |
timeScaleLerpDurationOnReset = 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 |
( |
| ) |
|
|
protectedvirtual |
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 |
( |
| ) |
|
|
protectedvirtual |
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 |
◆ _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:
- F:/Github/Store/InventoryEngineStore/Assets/InventoryEngine/MMTools/Core/MMTimeManager/MMTimeManager.cs