TopDown Engine v4.3
MoreMountains.Feedbacks.MMF_TrailRenderer Class Reference

This feedback will let you control the length, width and color of a target TrailRenderer over time More...

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

Public Types

enum  Modes { OverTime , Instant }
 the possible modes for this feedback More...
 

Public Attributes

TrailRenderer TargetTrailRenderer
 the trail renderer whose properties you want to modify More...
 
Modes Mode = Modes.OverTime
 whether the feedback should affect the sprite renderer instantly or over a period of time More...
 
float Duration = 2f
 how long the sprite renderer should change over time More...
 
bool AllowAdditivePlays = false
 if this is true, calling that feedback will trigger it, even if it's in progress. If it's false, it'll prevent any new Play until the current one is over More...
 
MMTweenType Transition = new MMTweenType(new AnimationCurve(new Keyframe(0, 0), new Keyframe(0.3f, 1f), new Keyframe(1, 0)))
 a curve to use to animate the trail renderer's density over time More...
 
bool ModifyWidth = true
 whether or not to modify the trail renderer's width More...
 
AnimationCurve NewWidth = new AnimationCurve(new Keyframe(0, 1), new Keyframe(1, 0))
 a curve defining the new width of the trail renderer, describing the world space width of the trail at each point along its length More...
 
bool ModifyColor = true
 whether or not to modify the trail renderer's color More...
 
Gradient NewColor = new Gradient()
 the colors to apply to the sprite renderer over time More...
 
bool ModifyTime = true
 whether or not to modify the trail renderer's time (how long the trail should be in seconds) More...
 
float NewTime = 2f
 the new trail renderer's time (how long the trail should be in seconds) to apply 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 CustomInitialization (MMF_Player owner)
 This method describes all custom initialization processes the feedback requires, in addition to the main Initialization method More...
 
override void CustomPlayFeedback (Vector3 position, float feedbacksIntensity=1.0f)
 On Play we change the values of our trail renderer More...
 
virtual IEnumerator TrailRendererSequence (float intensityMultiplier)
 This coroutine will modify the values on the trail renderer over time More...
 
virtual void SetTrailRendererValues (float time, float intensityMultiplier)
 Sets the various values on the trail renderer on a specified time (between 0 and 1) More...
 
override void CustomStopFeedback (Vector3 position, float feedbacksIntensity=1)
 Stops this feedback More...
 
override void CustomRestoreInitialValues ()
 On restore, we put our object back at its initial position More...
 

Protected Attributes

Coroutine _coroutine
 
Gradient _initialColor
 
AnimationCurve _initialWidth
 
float _initialTime
 
Gradient _firstColor
 
AnimationCurve _firstWidth
 
float _firstTime
 

Properties

override bool HasRandomness [get]
 sets the inspector color for this feedback More...
 
override bool HasCustomInspectors [get]
 
override float? FeedbackDuration [getset]
 the duration of this feedback is the duration of the sprite renderer, or 0 if instant More...
 

Additional Inherited Members

Detailed Description

This feedback will let you control the length, width and color of a target TrailRenderer over time

Member Enumeration Documentation

◆ Modes

the possible modes for this feedback

Enumerator
OverTime 
Instant 

Member Function Documentation

◆ CustomInitialization()

override void MoreMountains.Feedbacks.MMF_TrailRenderer.CustomInitialization ( MMF_Player  owner)
protectedvirtual

This method describes all custom initialization processes the feedback requires, in addition to the main Initialization method

Parameters
owner

Reimplemented from MoreMountains.Feedbacks.MMF_Feedback.

◆ CustomPlayFeedback()

override void MoreMountains.Feedbacks.MMF_TrailRenderer.CustomPlayFeedback ( Vector3  position,
float  feedbacksIntensity = 1.0f 
)
protectedvirtual

On Play we change the values of our trail renderer

Parameters
position
feedbacksIntensity

Implements MoreMountains.Feedbacks.MMF_Feedback.

◆ CustomRestoreInitialValues()

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

On restore, we put our object back at its initial position

Reimplemented from MoreMountains.Feedbacks.MMF_Feedback.

◆ CustomStopFeedback()

override void MoreMountains.Feedbacks.MMF_TrailRenderer.CustomStopFeedback ( Vector3  position,
float  feedbacksIntensity = 1 
)
protectedvirtual

Stops this feedback

Parameters
position
feedbacksIntensity

Reimplemented from MoreMountains.Feedbacks.MMF_Feedback.

◆ SetTrailRendererValues()

virtual void MoreMountains.Feedbacks.MMF_TrailRenderer.SetTrailRendererValues ( float  time,
float  intensityMultiplier 
)
protectedvirtual

Sets the various values on the trail renderer on a specified time (between 0 and 1)

Parameters
time

◆ TrailRendererSequence()

virtual IEnumerator MoreMountains.Feedbacks.MMF_TrailRenderer.TrailRendererSequence ( float  intensityMultiplier)
protectedvirtual

This coroutine will modify the values on the trail renderer over time

Returns

Member Data Documentation

◆ _coroutine

Coroutine MoreMountains.Feedbacks.MMF_TrailRenderer._coroutine
protected

◆ _firstColor

Gradient MoreMountains.Feedbacks.MMF_TrailRenderer._firstColor
protected

◆ _firstTime

float MoreMountains.Feedbacks.MMF_TrailRenderer._firstTime
protected

◆ _firstWidth

AnimationCurve MoreMountains.Feedbacks.MMF_TrailRenderer._firstWidth
protected

◆ _initialColor

Gradient MoreMountains.Feedbacks.MMF_TrailRenderer._initialColor
protected

◆ _initialTime

float MoreMountains.Feedbacks.MMF_TrailRenderer._initialTime
protected

◆ _initialWidth

AnimationCurve MoreMountains.Feedbacks.MMF_TrailRenderer._initialWidth
protected

◆ AllowAdditivePlays

bool MoreMountains.Feedbacks.MMF_TrailRenderer.AllowAdditivePlays = false

if this is true, calling that feedback will trigger it, even if it's in progress. If it's false, it'll prevent any new Play until the current one is over

◆ Duration

float MoreMountains.Feedbacks.MMF_TrailRenderer.Duration = 2f

how long the sprite renderer should change over time

◆ FeedbackTypeAuthorized

bool MoreMountains.Feedbacks.MMF_TrailRenderer.FeedbackTypeAuthorized = true
static

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

◆ Mode

Modes MoreMountains.Feedbacks.MMF_TrailRenderer.Mode = Modes.OverTime

whether the feedback should affect the sprite renderer instantly or over a period of time

◆ ModifyColor

bool MoreMountains.Feedbacks.MMF_TrailRenderer.ModifyColor = true

whether or not to modify the trail renderer's color

◆ ModifyTime

bool MoreMountains.Feedbacks.MMF_TrailRenderer.ModifyTime = true

whether or not to modify the trail renderer's time (how long the trail should be in seconds)

◆ ModifyWidth

bool MoreMountains.Feedbacks.MMF_TrailRenderer.ModifyWidth = true

whether or not to modify the trail renderer's width

◆ NewColor

Gradient MoreMountains.Feedbacks.MMF_TrailRenderer.NewColor = new Gradient()

the colors to apply to the sprite renderer over time

◆ NewTime

float MoreMountains.Feedbacks.MMF_TrailRenderer.NewTime = 2f

the new trail renderer's time (how long the trail should be in seconds) to apply

◆ NewWidth

AnimationCurve MoreMountains.Feedbacks.MMF_TrailRenderer.NewWidth = new AnimationCurve(new Keyframe(0, 1), new Keyframe(1, 0))

a curve defining the new width of the trail renderer, describing the world space width of the trail at each point along its length

◆ TargetTrailRenderer

TrailRenderer MoreMountains.Feedbacks.MMF_TrailRenderer.TargetTrailRenderer

the trail renderer whose properties you want to modify

◆ Transition

MMTweenType MoreMountains.Feedbacks.MMF_TrailRenderer.Transition = new MMTweenType(new AnimationCurve(new Keyframe(0, 0), new Keyframe(0.3f, 1f), new Keyframe(1, 0)))

a curve to use to animate the trail renderer's density over time

Property Documentation

◆ FeedbackDuration

override float? MoreMountains.Feedbacks.MMF_TrailRenderer.FeedbackDuration
getset

the duration of this feedback is the duration of the sprite renderer, or 0 if instant

◆ HasCustomInspectors

override bool MoreMountains.Feedbacks.MMF_TrailRenderer.HasCustomInspectors
get

◆ HasRandomness

override bool MoreMountains.Feedbacks.MMF_TrailRenderer.HasRandomness
get

sets the inspector color for this feedback


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