Feel 5.9.1
The best way to improve your game's feel and make it extra juicy
Loading...
Searching...
No Matches
MoreMountains.Feedbacks.MMF_TimescaleModifier Class Reference

This feedback changes the timescale by sending a TimeScale event on play. More...

Inheritance diagram for MoreMountains.Feedbacks.MMF_TimescaleModifier:
MoreMountains.Feedbacks.MMF_Feedback

Public Types

enum  Modes { Shake , Change , Reset , Unfreeze }
 The possible modes for this feedback : More...

Public Member Functions

override void AutomaticShakerSetup ()
 Automatically adds a MMTimeManager to the scene.
override void OnValidate ()
 On Validate, we init our curves conditions if needed.

Public Attributes

Modes Mode = Modes.Shake
 sets the inspector color for this feedback
float TimeScale = 0.5f
 the new timescale to apply
float TimeScaleDuration = 1f
 the duration of the timescale modification
bool ResetTimescaleOnStop = false
 whether to reset the timescale on Stop or not
bool UnfreezeTimescaleOnStop = false
 whether to unfreeze the timescale on Stop or not - if you set this to true, ResetTimescaleOnStop will be ignored
bool TimeScaleLerp = false
 whether or not we should lerp the timescale
MMTimeScaleLerpModes TimescaleLerpMode = MMTimeScaleLerpModes.Speed
 whether to lerp over a set duration, or at a certain speed
float TimeScaleLerpSpeed = 1f
 in Speed mode, the speed at which to lerp the timescale
MMTweenType TimescaleLerpCurve
 in Duration mode, the curve to use to lerp the timescale
float TimescaleLerpDuration = 1f
 in Duration mode, the duration of the timescale interpolation, in unscaled time seconds
bool TimeScaleLerpOnUnfreeze = false
 whether or not we should lerp the timescale as it goes back to normal afterwards when using Unfreeze mode
MMTweenType TimescaleLerpCurveOnUnfreeze
 in Duration mode, the curve to use to lerp the timescale when unfreezing if TimeScaleLerpOnUnfreeze is true
float TimescaleLerpDurationOnUnfreeze = 1f
 in Duration mode, the duration of the timescale interpolation, in unscaled time seconds when unfreezing if TimeScaleLerpOnUnfreeze is true

Static Public Attributes

static bool FeedbackTypeAuthorized = true
 a static bool used to disable all feedbacks of this type at once

Protected Member Functions

override void CustomPlayFeedback (Vector3 position, float feedbacksIntensity=1.0f)
 On Play, triggers a time scale event.
override void CustomStopFeedback (Vector3 position, float feedbacksIntensity=1.0f)
 On stop, we reset timescale if needed.
override void CustomRestoreInitialValues ()
 On restore, we restore our initial state.

Properties

override float FeedbackDuration [get, set]
 the duration of this feedback is the duration of the time modification

Additional Inherited Members

Detailed Description

This feedback changes the timescale by sending a TimeScale event on play.

Member Enumeration Documentation

◆ Modes

The possible modes for this feedback :

  • shake : changes the timescale for a certain duration
  • change : sets the timescale to a new value, forever (until you change it again)
  • reset : resets the timescale to its previous value
Enumerator
Shake 
Change 
Reset 
Unfreeze 

Member Function Documentation

◆ AutomaticShakerSetup()

override void MoreMountains.Feedbacks.MMF_TimescaleModifier.AutomaticShakerSetup ( )
virtual

Automatically adds a MMTimeManager to the scene.

Reimplemented from MoreMountains.Feedbacks.MMF_Feedback.

◆ CustomPlayFeedback()

override void MoreMountains.Feedbacks.MMF_TimescaleModifier.CustomPlayFeedback ( Vector3 position,
float feedbacksIntensity = 1::0f )
protected

On Play, triggers a time scale event.

Parameters
position
feedbacksIntensity

◆ CustomRestoreInitialValues()

override void MoreMountains.Feedbacks.MMF_TimescaleModifier.CustomRestoreInitialValues ( )
protectedvirtual

On restore, we restore our initial state.

Reimplemented from MoreMountains.Feedbacks.MMF_Feedback.

◆ CustomStopFeedback()

override void MoreMountains.Feedbacks.MMF_TimescaleModifier.CustomStopFeedback ( Vector3 position,
float feedbacksIntensity = 1::0f )
protectedvirtual

On stop, we reset timescale if needed.

Parameters
position
feedbacksIntensity

Reimplemented from MoreMountains.Feedbacks.MMF_Feedback.

◆ OnValidate()

override void MoreMountains.Feedbacks.MMF_TimescaleModifier.OnValidate ( )
virtual

On Validate, we init our curves conditions if needed.

Reimplemented from MoreMountains.Feedbacks.MMF_Feedback.

Member Data Documentation

◆ FeedbackTypeAuthorized

bool MoreMountains.Feedbacks.MMF_TimescaleModifier.FeedbackTypeAuthorized = true
static

a static bool used to disable all feedbacks of this type at once

◆ Mode

Modes MoreMountains.Feedbacks.MMF_TimescaleModifier.Mode = Modes.Shake

sets the inspector color for this feedback

the selected mode

◆ ResetTimescaleOnStop

bool MoreMountains.Feedbacks.MMF_TimescaleModifier.ResetTimescaleOnStop = false

whether to reset the timescale on Stop or not

◆ TimeScale

float MoreMountains.Feedbacks.MMF_TimescaleModifier.TimeScale = 0.5f

the new timescale to apply

◆ TimeScaleDuration

float MoreMountains.Feedbacks.MMF_TimescaleModifier.TimeScaleDuration = 1f

the duration of the timescale modification

◆ TimeScaleLerp

bool MoreMountains.Feedbacks.MMF_TimescaleModifier.TimeScaleLerp = false

whether or not we should lerp the timescale

◆ TimescaleLerpCurve

MMTweenType MoreMountains.Feedbacks.MMF_TimescaleModifier.TimescaleLerpCurve
Initial value:
= new MMTweenType( new AnimationCurve(new Keyframe(0, 0), new Keyframe(1, 1)),
enumConditionPropertyName:"TimescaleLerpMode", enumConditionValues:(int)MMTimeScaleLerpModes.Duration)
MMTimeScaleLerpModes
The possible modes with which to interpolate time scale. Speed is a legacy mode, the recommended mode...
Definition MMTimeManager.cs:20

in Duration mode, the curve to use to lerp the timescale

◆ TimescaleLerpCurveOnUnfreeze

MMTweenType MoreMountains.Feedbacks.MMF_TimescaleModifier.TimescaleLerpCurveOnUnfreeze
Initial value:
= new MMTweenType( new AnimationCurve(new Keyframe(0, 0), new Keyframe(1, 1)),
enumConditionPropertyName:"TimescaleLerpMode", enumConditionValues:(int)MMTimeScaleLerpModes.Duration)

in Duration mode, the curve to use to lerp the timescale when unfreezing if TimeScaleLerpOnUnfreeze is true

◆ TimescaleLerpDuration

float MoreMountains.Feedbacks.MMF_TimescaleModifier.TimescaleLerpDuration = 1f

in Duration mode, the duration of the timescale interpolation, in unscaled time seconds

◆ TimescaleLerpDurationOnUnfreeze

float MoreMountains.Feedbacks.MMF_TimescaleModifier.TimescaleLerpDurationOnUnfreeze = 1f

in Duration mode, the duration of the timescale interpolation, in unscaled time seconds when unfreezing if TimeScaleLerpOnUnfreeze is true

◆ TimescaleLerpMode

MMTimeScaleLerpModes MoreMountains.Feedbacks.MMF_TimescaleModifier.TimescaleLerpMode = MMTimeScaleLerpModes.Speed

whether to lerp over a set duration, or at a certain speed

◆ TimeScaleLerpOnUnfreeze

bool MoreMountains.Feedbacks.MMF_TimescaleModifier.TimeScaleLerpOnUnfreeze = false

whether or not we should lerp the timescale as it goes back to normal afterwards when using Unfreeze mode

◆ TimeScaleLerpSpeed

float MoreMountains.Feedbacks.MMF_TimescaleModifier.TimeScaleLerpSpeed = 1f

in Speed mode, the speed at which to lerp the timescale

◆ UnfreezeTimescaleOnStop

bool MoreMountains.Feedbacks.MMF_TimescaleModifier.UnfreezeTimescaleOnStop = false

whether to unfreeze the timescale on Stop or not - if you set this to true, ResetTimescaleOnStop will be ignored

Property Documentation

◆ FeedbackDuration

override float MoreMountains.Feedbacks.MMF_TimescaleModifier.FeedbackDuration
getset

the duration of this feedback is the duration of the time modification


The documentation for this class was generated from the following file: