Feel  4.0.1
The best way to improve your game's feel and make it extra juicy
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 { Modes.Shake, Modes.Change, Modes.Reset, Modes.Unfreeze }
 The possible modes for this feedback : More...
 

Public Member Functions

override void AutomaticShakerSetup ()
 Automatically adds a MMTimeManager to the scene 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 = new MMTweenType( new AnimationCurve(new Keyframe(0, 0), new Keyframe(1, 1)))
 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 = new MMTweenType( new AnimationCurve(new Keyframe(0, 0), new Keyframe(1, 1)))
 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 [get, set]
 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.

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 = new MMTweenType( new AnimationCurve(new Keyframe(0, 0), new Keyframe(1, 1)))

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

◆ TimescaleLerpCurveOnReset

MMTweenType MoreMountains.Feedbacks.MMF_TimescaleModifier.TimescaleLerpCurveOnReset = new MMTweenType( new AnimationCurve(new Keyframe(0, 0), new Keyframe(1, 1)))

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: