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

This feedback will let you change the color of a target Graphic over time. More...

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

Public Types

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

Public Attributes

override bool HasChannel => true
 
override bool HasAutomatedTargetAcquisition => true
 
Graphic TargetGraphic
 the Graphic to affect when playing the feedback More...
 
Modes Mode = Modes.OverTime
 whether the feedback should affect the Graphic instantly or over a period of time More...
 
float Duration = 0.2f
 how long the Graphic should change over time More...
 
bool StartsOff = false
 whether or not that Graphic should be turned off on start More...
 
bool DisableOnStop = false
 if this is true, the target will be disabled when this feedbacks is stopped 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...
 
bool ModifyColor = true
 whether or not to modify the color of the Graphic More...
 
Gradient ColorOverTime
 the colors to apply to the Graphic over time More...
 
Color InstantColor
 the color to move to in instant mode 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 Graphic off if needed More...
 
override void CustomPlayFeedback (Vector3 position, float feedbacksIntensity=1.0f)
 On Play we turn our Graphic on and start an over time coroutine if needed More...
 
virtual IEnumerator GraphicSequence ()
 This coroutine will modify the values on the Graphic More...
 
virtual void SetGraphicValues (float time)
 Sets the various values on the Graphic on a specified time (between 0 and 1) More...
 
override void CustomStopFeedback (Vector3 position, float feedbacksIntensity=1)
 Turns the Graphic off on stop More...
 
virtual void Turn (bool status)
 Turns the Graphic on or off More...
 
override void CustomRestoreInitialValues ()
 On restore, we restore our initial state More...
 

Protected Attributes

Coroutine _coroutine
 
Color _initialColor
 

Properties

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

Additional Inherited Members

Detailed Description

This feedback will let you change the color of a target Graphic over time.

Member Enumeration Documentation

◆ Modes

the possible modes for this feedback

Enumerator
OverTime 
Instant 

Member Function Documentation

◆ AutomateTargetAcquisition()

override void MoreMountains.Feedbacks.MMF_Graphic.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_Graphic.CustomInitialization ( MMF_Player  owner)
protectedvirtual

On init we turn the Graphic off if needed

Parameters
owner

Reimplemented from MoreMountains.Feedbacks.MMF_Feedback.

◆ CustomPlayFeedback()

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

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

Parameters
position
feedbacksIntensity

Implements MoreMountains.Feedbacks.MMF_Feedback.

◆ CustomRestoreInitialValues()

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

On restore, we restore our initial state

Reimplemented from MoreMountains.Feedbacks.MMF_Feedback.

◆ CustomStopFeedback()

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

Turns the Graphic off on stop

Parameters
position
feedbacksIntensity

Reimplemented from MoreMountains.Feedbacks.MMF_Feedback.

◆ GraphicSequence()

virtual IEnumerator MoreMountains.Feedbacks.MMF_Graphic.GraphicSequence ( )
protectedvirtual

This coroutine will modify the values on the Graphic

Returns

◆ SetGraphicValues()

virtual void MoreMountains.Feedbacks.MMF_Graphic.SetGraphicValues ( float  time)
protectedvirtual

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

Parameters
time

◆ Turn()

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

Turns the Graphic on or off

Parameters
status

Member Data Documentation

◆ _coroutine

Coroutine MoreMountains.Feedbacks.MMF_Graphic._coroutine
protected

◆ _initialColor

Color MoreMountains.Feedbacks.MMF_Graphic._initialColor
protected

◆ AllowAdditivePlays

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

◆ ColorOverTime

Gradient MoreMountains.Feedbacks.MMF_Graphic.ColorOverTime

the colors to apply to the Graphic over time

◆ DisableOnStop

bool MoreMountains.Feedbacks.MMF_Graphic.DisableOnStop = false

if this is true, the target will be disabled when this feedbacks is stopped

◆ Duration

float MoreMountains.Feedbacks.MMF_Graphic.Duration = 0.2f

how long the Graphic should change over time

◆ FeedbackTypeAuthorized

bool MoreMountains.Feedbacks.MMF_Graphic.FeedbackTypeAuthorized = true
static

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

◆ HasAutomatedTargetAcquisition

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

◆ HasChannel

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

◆ InstantColor

Color MoreMountains.Feedbacks.MMF_Graphic.InstantColor

the color to move to in instant mode

◆ Mode

Modes MoreMountains.Feedbacks.MMF_Graphic.Mode = Modes.OverTime

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

◆ ModifyColor

bool MoreMountains.Feedbacks.MMF_Graphic.ModifyColor = true

whether or not to modify the color of the Graphic

◆ StartsOff

bool MoreMountains.Feedbacks.MMF_Graphic.StartsOff = false

whether or not that Graphic should be turned off on start

◆ TargetGraphic

Graphic MoreMountains.Feedbacks.MMF_Graphic.TargetGraphic

the Graphic to affect when playing the feedback

Property Documentation

◆ FeedbackDuration

override float? MoreMountains.Feedbacks.MMF_Graphic.FeedbackDuration
getset

sets the inspector color for this feedback

the duration of this feedback is the duration of the Graphic, or 0 if instant


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