Feel  3.16
The best way to improve your game's feel and make it extra juicy
MoreMountains.Feedbacks.MMF_SpriteRenderer Class Reference

This feedback will let you change the color of a target sprite renderer over time, and flip it on X or Y. You can also use it to command one or many MMSpriteRendererShakers. More...

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

Public Types

enum  Modes {
  Modes.OverTime, Modes.Instant, Modes.ShakerEvent, Modes.ToDestinationColor,
  Modes.ToDestinationColorAndBack
}
 the possible modes for this feedback More...
 
enum  InitialColorModes { InitialColorModes.InitialColorOnInit, InitialColorModes.InitialColorOnPlay }
 the different ways to grab initial color More...
 

Public Member Functions

override void OnDisable ()
 On disable, More...
 

Public Attributes

override bool HasChannel => true
 
override bool HasRandomness => true
 
override bool HasAutomatedTargetAcquisition => true
 
SpriteRenderer BoundSpriteRenderer
 the SpriteRenderer to affect when playing the feedback More...
 
Modes Mode = Modes.OverTime
 whether the feedback should affect the sprite renderer instantly or over a period of time More...
 
float Duration = 0.2f
 how long the sprite renderer should change over time More...
 
bool StartsOff = false
 whether or not that sprite renderer should be turned off on start More...
 
bool ResetShakerValuesAfterShake = true
 whether or not to reset shaker values after shake More...
 
bool ResetTargetValuesAfterShake = true
 whether or not to reset the target's values after shake More...
 
bool OnlyBroadcastInRange = false
 whether or not to broadcast a range to only affect certain shakers More...
 
float EventRange = 100f
 the range of the event, in units More...
 
Transform EventOriginTransform
 the transform to use to broadcast the event as origin point 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...
 
InitialColorModes InitialColorMode = InitialColorModes.InitialColorOnPlay
 whether to grab the initial color to (potentially) go back to at init or when the feedback plays More...
 
bool ModifyColor = true
 whether or not to modify the color of the sprite renderer More...
 
Gradient ColorOverTime
 the colors to apply to the sprite renderer over time More...
 
Color InstantColor
 the color to move to in instant mode More...
 
Color ToDestinationColor = Color.red
 the color to move to in ToDestination mode More...
 
AnimationCurve ToDestinationColorCurve = new AnimationCurve(new Keyframe(0, 0f), new Keyframe(1, 1f))
 the color to move to in ToDestination mode More...
 
bool FlipX = false
 whether or not to flip the sprite on X More...
 
bool FlipY = false
 whether or not to flip the sprite on Y 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 AutomateTargetAcquisition ()
 A method meant to be implemented per feedback letting you specify what happens (usually setting a target) More...
 
override void CustomInitialization (MMF_Player owner)
 On init we turn the sprite renderer off if needed More...
 
override void CustomPlayFeedback (Vector3 position, float feedbacksIntensity=1.0f)
 On Play we turn our sprite renderer on and start an over time coroutine if needed More...
 
virtual IEnumerator SpriteRendererSequence ()
 This coroutine will modify the values on the SpriteRenderer More...
 
virtual IEnumerator SpriteRendererToDestinationSequence (bool andBack)
 This coroutine will modify the values on the SpriteRenderer More...
 
virtual void Flip ()
 Flips the sprite on X or Y based on the FlipX/FlipY settings More...
 
virtual void SetSpriteRendererValues (float time)
 Sets the various values on the sprite renderer on a specified time (between 0 and 1) More...
 
override void CustomStopFeedback (Vector3 position, float feedbacksIntensity=1)
 Stops the transition on stop if needed More...
 
virtual void Turn (bool status)
 Turns the sprite renderer on or off More...
 
override void CustomRestoreInitialValues ()
 On restore, we restore our initial state More...
 

Protected Attributes

Coroutine _coroutine
 
Color _initialColor
 
bool _initialFlipX
 
bool _initialFlipY
 

Properties

override float? FeedbackDuration [get, set]
 sets the inspector color for this feedback More...
 

Detailed Description

This feedback will let you change the color of a target sprite renderer over time, and flip it on X or Y. You can also use it to command one or many MMSpriteRendererShakers.

Member Enumeration Documentation

◆ InitialColorModes

the different ways to grab initial color

Enumerator
InitialColorOnInit 
InitialColorOnPlay 

◆ Modes

the possible modes for this feedback

Enumerator
OverTime 
Instant 
ShakerEvent 
ToDestinationColor 
ToDestinationColorAndBack 

Member Function Documentation

◆ AutomateTargetAcquisition()

override void MoreMountains.Feedbacks.MMF_SpriteRenderer.AutomateTargetAcquisition ( )
protectedvirtual

A method meant to be implemented per feedback letting you specify what happens (usually setting a target)

Reimplemented from MoreMountains.Feedbacks.MMF_Feedback.

◆ CustomInitialization()

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

On init we turn the sprite renderer off if needed

Parameters
owner

Reimplemented from MoreMountains.Feedbacks.MMF_Feedback.

◆ CustomPlayFeedback()

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

On Play we turn our sprite renderer on and start an over time coroutine if needed

Parameters
position
feedbacksIntensity

Implements MoreMountains.Feedbacks.MMF_Feedback.

◆ CustomRestoreInitialValues()

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

On restore, we restore our initial state

Reimplemented from MoreMountains.Feedbacks.MMF_Feedback.

◆ CustomStopFeedback()

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

Stops the transition on stop if needed

Parameters
position
feedbacksIntensity

Reimplemented from MoreMountains.Feedbacks.MMF_Feedback.

◆ Flip()

virtual void MoreMountains.Feedbacks.MMF_SpriteRenderer.Flip ( )
protectedvirtual

Flips the sprite on X or Y based on the FlipX/FlipY settings

◆ OnDisable()

override void MoreMountains.Feedbacks.MMF_SpriteRenderer.OnDisable ( )
virtual

On disable,

Reimplemented from MoreMountains.Feedbacks.MMF_Feedback.

◆ SetSpriteRendererValues()

virtual void MoreMountains.Feedbacks.MMF_SpriteRenderer.SetSpriteRendererValues ( float  time)
protectedvirtual

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

Parameters
time

◆ SpriteRendererSequence()

virtual IEnumerator MoreMountains.Feedbacks.MMF_SpriteRenderer.SpriteRendererSequence ( )
protectedvirtual

This coroutine will modify the values on the SpriteRenderer

Returns

◆ SpriteRendererToDestinationSequence()

virtual IEnumerator MoreMountains.Feedbacks.MMF_SpriteRenderer.SpriteRendererToDestinationSequence ( bool  andBack)
protectedvirtual

This coroutine will modify the values on the SpriteRenderer

Returns

◆ Turn()

virtual void MoreMountains.Feedbacks.MMF_SpriteRenderer.Turn ( bool  status)
protectedvirtual

Turns the sprite renderer on or off

Parameters
status

Member Data Documentation

◆ _coroutine

Coroutine MoreMountains.Feedbacks.MMF_SpriteRenderer._coroutine
protected

◆ _initialColor

Color MoreMountains.Feedbacks.MMF_SpriteRenderer._initialColor
protected

◆ _initialFlipX

bool MoreMountains.Feedbacks.MMF_SpriteRenderer._initialFlipX
protected

◆ _initialFlipY

bool MoreMountains.Feedbacks.MMF_SpriteRenderer._initialFlipY
protected

◆ AllowAdditivePlays

bool MoreMountains.Feedbacks.MMF_SpriteRenderer.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

◆ BoundSpriteRenderer

SpriteRenderer MoreMountains.Feedbacks.MMF_SpriteRenderer.BoundSpriteRenderer

the SpriteRenderer to affect when playing the feedback

◆ ColorOverTime

Gradient MoreMountains.Feedbacks.MMF_SpriteRenderer.ColorOverTime

the colors to apply to the sprite renderer over time

◆ Duration

float MoreMountains.Feedbacks.MMF_SpriteRenderer.Duration = 0.2f

how long the sprite renderer should change over time

◆ EventOriginTransform

Transform MoreMountains.Feedbacks.MMF_SpriteRenderer.EventOriginTransform

the transform to use to broadcast the event as origin point

◆ EventRange

float MoreMountains.Feedbacks.MMF_SpriteRenderer.EventRange = 100f

the range of the event, in units

◆ FeedbackTypeAuthorized

bool MoreMountains.Feedbacks.MMF_SpriteRenderer.FeedbackTypeAuthorized = true
static

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

◆ FlipX

bool MoreMountains.Feedbacks.MMF_SpriteRenderer.FlipX = false

whether or not to flip the sprite on X

◆ FlipY

bool MoreMountains.Feedbacks.MMF_SpriteRenderer.FlipY = false

whether or not to flip the sprite on Y

◆ HasAutomatedTargetAcquisition

override bool MoreMountains.Feedbacks.MMF_SpriteRenderer.HasAutomatedTargetAcquisition => true

◆ HasChannel

override bool MoreMountains.Feedbacks.MMF_SpriteRenderer.HasChannel => true

◆ HasRandomness

override bool MoreMountains.Feedbacks.MMF_SpriteRenderer.HasRandomness => true

◆ InitialColorMode

InitialColorModes MoreMountains.Feedbacks.MMF_SpriteRenderer.InitialColorMode = InitialColorModes.InitialColorOnPlay

whether to grab the initial color to (potentially) go back to at init or when the feedback plays

◆ InstantColor

Color MoreMountains.Feedbacks.MMF_SpriteRenderer.InstantColor

the color to move to in instant mode

◆ Mode

Modes MoreMountains.Feedbacks.MMF_SpriteRenderer.Mode = Modes.OverTime

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

◆ ModifyColor

bool MoreMountains.Feedbacks.MMF_SpriteRenderer.ModifyColor = true

whether or not to modify the color of the sprite renderer

◆ OnlyBroadcastInRange

bool MoreMountains.Feedbacks.MMF_SpriteRenderer.OnlyBroadcastInRange = false

whether or not to broadcast a range to only affect certain shakers

◆ ResetShakerValuesAfterShake

bool MoreMountains.Feedbacks.MMF_SpriteRenderer.ResetShakerValuesAfterShake = true

whether or not to reset shaker values after shake

◆ ResetTargetValuesAfterShake

bool MoreMountains.Feedbacks.MMF_SpriteRenderer.ResetTargetValuesAfterShake = true

whether or not to reset the target's values after shake

◆ StartsOff

bool MoreMountains.Feedbacks.MMF_SpriteRenderer.StartsOff = false

whether or not that sprite renderer should be turned off on start

◆ ToDestinationColor

Color MoreMountains.Feedbacks.MMF_SpriteRenderer.ToDestinationColor = Color.red

the color to move to in ToDestination mode

◆ ToDestinationColorCurve

AnimationCurve MoreMountains.Feedbacks.MMF_SpriteRenderer.ToDestinationColorCurve = new AnimationCurve(new Keyframe(0, 0f), new Keyframe(1, 1f))

the color to move to in ToDestination mode

Property Documentation

◆ FeedbackDuration

override float? MoreMountains.Feedbacks.MMF_SpriteRenderer.FeedbackDuration
getset

sets the inspector color for this feedback

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


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