Feel
5.2
The best way to improve your game's feel and make it extra juicy
|
Put this component in your scene and it'll catch MMFreezeFrameEvents and MMTimeScaleEvents, allowing you to control the flow of time. More...
Public Member Functions | |
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 | ResetTimeScale () |
Resets the time scale to the stored normal time scale More... | |
virtual void | Unfreeze () |
Resets the time scale to the last saved time scale. 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... | |
Public Attributes | |
float | NormalTimeScale = 1f |
The reference time scale, to which the system will go back to after all time is changed. More... | |
bool | UpdateTimescale = true |
whether or not to update Time.timeScale when changing time scale More... | |
bool | UpdateFixedDeltaTime = true |
whether or not to update Time.fixedDeltaTime when changing time scale More... | |
bool | UpdateMaximumDeltaTime = true |
whether or not to update Time.maximumDeltaTime when changing time scale More... | |
float | CurrentTimeScale = 1f |
the current, real time, time scale More... | |
float | TargetTimeScale = 1f |
the time scale the system is lerping towards More... | |
bool | TestButton |
a test button for the inspector More... | |
Protected Member Functions | |
virtual void | TestButtonToSlowDownTime () |
A method used from the inspector to test the system More... | |
override void | Awake () |
On start we initialize our stack More... | |
virtual void | Start () |
On Start we apply our timescale More... | |
virtual void | Update () |
On Update, applies the time scale and resets it if needed More... | |
virtual void | ApplyTimeScale (float newValue) |
Modifies the time scale and time attributes to match the new time scale More... | |
virtual void | SetTimeScale (float newTimeScale) |
Resets all stacked time scale changes and simply sets the time scale, until further changes More... | |
virtual void | SetTimeScale (TimeScaleProperties timeScaleProperties) |
Sets the time scale for the specified properties (duration, time scale, lerp or not, and lerp speed) More... | |
Protected Member Functions inherited from MoreMountains.Tools.MMSingleton< MMTimeManager > | |
virtual void | InitializeSingleton () |
Initializes the singleton. More... | |
Static Protected Member Functions | |
static void | InitializeStatics () |
Statics initialization to support enter play modes More... | |
Protected Attributes | |
Stack< TimeScaleProperties > | _timeScaleProperties |
TimeScaleProperties | _currentProperty |
TimeScaleProperties | _resetProperty |
float | _initialFixedDeltaTime = 0f |
float | _initialMaximumDeltaTime = 0f |
float | _startedAt |
bool | _lerpingBackToNormal = false |
float | _timeScaleLastTime = float.NegativeInfinity |
Additional Inherited Members | |
Static Public Member Functions inherited from MoreMountains.Tools.MMSingleton< MMTimeManager > | |
static T | TryGetInstance () |
Static Public Attributes inherited from MoreMountains.Tools.MMSingleton< MMTimeManager > | |
static bool | HasInstance |
static T | Current |
Static Protected Attributes inherited from MoreMountains.Tools.MMSingleton< MMTimeManager > | |
static T | _instance |
Properties inherited from MoreMountains.Tools.MMSingleton< MMTimeManager > | |
static T | Instance [get] |
Singleton design pattern More... | |
Put this component in your scene and it'll catch MMFreezeFrameEvents and MMTimeScaleEvents, allowing you to control the flow of time.
|
protectedvirtual |
Modifies the time scale and time attributes to match the new time scale
newValue |
|
protectedvirtual |
On start we initialize our stack
Reimplemented from MoreMountains.Tools.MMSingleton< MMTimeManager >.
|
virtual |
On init we store our initial timescales and apply the normal timescale
|
staticprotected |
Statics initialization to support enter play modes
|
virtual |
When getting a freeze frame event we stop the time
freezeFrameEvent | Freeze frame event. |
|
virtual |
Catches TimeScaleEvents and acts on them
timeScaleEvent | MMTimeScaleEvent event. |
|
virtual |
We initialize our stack
|
virtual |
Resets the time scale to the stored normal time scale
|
protectedvirtual |
Resets all stacked time scale changes and simply sets the time scale, until further changes
newTimeScale | New time scale. |
|
protectedvirtual |
Sets the time scale for the specified properties (duration, time scale, lerp or not, and lerp speed)
timeScaleProperties | Time scale properties. |
|
virtual |
Sets the time scale to the specified value, instantly
newNormalTimeScale | New normal time scale. |
|
protectedvirtual |
On Start we apply our timescale
|
protectedvirtual |
A method used from the inspector to test the system
|
virtual |
Resets the time scale to the last saved time scale.
|
protectedvirtual |
On Update, applies the time scale and resets it if needed
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
float MoreMountains.Feedbacks.MMTimeManager.CurrentTimeScale = 1f |
the current, real time, time scale
float MoreMountains.Feedbacks.MMTimeManager.NormalTimeScale = 1f |
The reference time scale, to which the system will go back to after all time is changed.
float MoreMountains.Feedbacks.MMTimeManager.TargetTimeScale = 1f |
the time scale the system is lerping towards
bool MoreMountains.Feedbacks.MMTimeManager.TestButton |
a test button for the inspector
bool MoreMountains.Feedbacks.MMTimeManager.UpdateFixedDeltaTime = true |
whether or not to update Time.fixedDeltaTime when changing time scale
bool MoreMountains.Feedbacks.MMTimeManager.UpdateMaximumDeltaTime = true |
whether or not to update Time.maximumDeltaTime when changing time scale
bool MoreMountains.Feedbacks.MMTimeManager.UpdateTimescale = true |
whether or not to update Time.timeScale when changing time scale