TopDown Engine v4.3
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 More...
 
override void OnValidate ()
 On Validate, we init our curves conditions if needed More...
 

Public Attributes

Modes Mode = Modes.Shake
 sets the inspector color for this feedback More...
 
float TimeScale = 0.5f
 the new timescale to apply More...
 
float TimeScaleDuration = 1f
 the duration of the timescale modification More...
 
bool ResetTimescaleOnStop = false
 whether to reset the timescale on Stop or not More...
 
bool TimeScaleLerp = false
 whether or not we should lerp the timescale More...
 
MMTimeScaleLerpModes TimescaleLerpMode = MMTimeScaleLerpModes.Speed
 whether to lerp over a set duration, or at a certain speed More...
 
float TimeScaleLerpSpeed = 1f
 in Speed mode, the speed at which to lerp the timescale More...
 
MMTweenType TimescaleLerpCurve
 in Duration mode, the curve to use to lerp the timescale More...
 
float TimescaleLerpDuration = 1f
 in Duration mode, the duration of the timescale interpolation, in unscaled time seconds More...
 
bool TimeScaleLerpOnReset = false
 whether or not we should lerp the timescale as it goes back to normal afterwards More...
 
MMTweenType TimescaleLerpCurveOnReset
 in Duration mode, the curve to use to lerp the timescale More...
 
float TimescaleLerpDurationOnReset = 1f
 in Duration mode, the duration of the timescale interpolation, in unscaled time seconds More...
 

Static Public Attributes

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

Protected Member Functions

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

Properties

override float FeedbackDuration [getset]
 the duration of this feedback is the duration of the time modification More...
 

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 
)
protectedvirtual

On Play, triggers a time scale event

Parameters
position
feedbacksIntensity

Implements MoreMountains.Feedbacks.MMF_Feedback.

◆ 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

◆ TimescaleLerpCurveOnReset

MMTweenType MoreMountains.Feedbacks.MMF_TimescaleModifier.TimescaleLerpCurveOnReset
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

◆ TimescaleLerpDuration

float MoreMountains.Feedbacks.MMF_TimescaleModifier.TimescaleLerpDuration = 1f

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

◆ TimescaleLerpDurationOnReset

float MoreMountains.Feedbacks.MMF_TimescaleModifier.TimescaleLerpDurationOnReset = 1f

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

◆ TimescaleLerpMode

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

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

◆ TimeScaleLerpOnReset

bool MoreMountains.Feedbacks.MMF_TimescaleModifier.TimeScaleLerpOnReset = false

whether or not we should lerp the timescale as it goes back to normal afterwards

◆ TimeScaleLerpSpeed

float MoreMountains.Feedbacks.MMF_TimescaleModifier.TimeScaleLerpSpeed = 1f

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

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: