Feel  4.0.1
The best way to improve your game's feel and make it extra juicy
MoreMountains.Feedbacks.MMF_FeedbackBase Class Referenceabstract
Inheritance diagram for MoreMountains.Feedbacks.MMF_FeedbackBase:
MoreMountains.Feedbacks.MMF_Feedback MoreMountains.Feedbacks.MMF_Broadcast MoreMountains.Feedbacks.MMF_CanvasGroup MoreMountains.Feedbacks.MMF_RectTransformAnchor MoreMountains.Feedbacks.MMF_RectTransformOffset MoreMountains.Feedbacks.MMF_RectTransformPivot MoreMountains.Feedbacks.MMF_RectTransformSizeDelta MoreMountains.Feedbacks.MMF_TextFontSize MoreMountains.Feedbacks.MMF_TMPCharacterSpacing MoreMountains.Feedbacks.MMF_TMPFontSize MoreMountains.Feedbacks.MMF_TMPLineSpacing MoreMountains.Feedbacks.MMF_TMPOutlineWidth MoreMountains.Feedbacks.MMF_TMPParagraphSpacing MoreMountains.Feedbacks.MMF_TMPWordSpacing

Public Types

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

Public Member Functions

virtual void PrepareTargets ()
 Creates a new list, fills the targets, and initializes them More...
 
override void OnValidate ()
 On validate (if a value has changed in the inspector), we reinitialize what needs to be More...
 

Public Attributes

Modes Mode = Modes.OverTime
 whether the feedback should affect the target property instantly or over a period of time More...
 
float Duration = 0.2f
 how long the target property should change over time More...
 
bool StartsOff = false
 whether or not that target property should be turned off on start More...
 
bool EndsOff = false
 whether or not that target property should be turned off once the feedback is done playing More...
 
bool RelativeValues = true
 whether or not the values should be relative or not 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 DisableOnStop = false
 if this is true, the target object will be disabled on stop More...
 
bool OnlyPlayIfTargetIsActive = false
 if this is true, this feedback will only play if its target is active in hierarchy More...
 
override bool HasRandomness => true
 
override bool HasCustomInspectors => true
 

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)
 On init we turn the target property off if needed More...
 
abstract void FillTargets ()
 Fills our list of targets, meant to be extended More...
 
virtual void InitializeTargets ()
 Initializes each target in the list More...
 
override void CustomPlayFeedback (Vector3 position, float feedbacksIntensity=1.0f)
 On Play we turn our target property on and start an over time coroutine if needed More...
 
virtual void Instant ()
 Plays an instant feedback More...
 
override void CustomRestoreInitialValues ()
 On restore, we put our object back at its initial position More...
 
virtual IEnumerator UpdateValueSequence (float feedbacksIntensity, Vector3 position)
 This coroutine will modify the values on the target property More...
 
virtual void SetValues (float time, float feedbacksIntensity, Vector3 position)
 Sets the various values on the target property on a specified time (between 0 and 1) More...
 
override void CustomStopFeedback (Vector3 position, float feedbacksIntensity=1)
 Turns the target property object off on stop if needed More...
 
virtual void Turn (bool status)
 Turns the target object on or off More...
 
virtual bool CanPlay ()
 Checks whether or not this feedback should play according to the defined settings More...
 

Protected Attributes

List< MMF_FeedbackBaseTarget_targets
 
Coroutine _coroutine = null
 

Properties

override float? FeedbackDuration [get, set]
 the duration of this feedback is the duration of the target property, or 0 if instant More...
 

Member Enumeration Documentation

◆ Modes

the possible modes for this feedback

Enumerator
OverTime 
Instant 

Member Function Documentation

◆ CanPlay()

virtual bool MoreMountains.Feedbacks.MMF_FeedbackBase.CanPlay ( )
protectedvirtual

Checks whether or not this feedback should play according to the defined settings

Returns

◆ CustomInitialization()

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

On init we turn the target property off if needed

Parameters
owner

Reimplemented from MoreMountains.Feedbacks.MMF_Feedback.

◆ CustomPlayFeedback()

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

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

Parameters
position
feedbacksIntensity

Implements MoreMountains.Feedbacks.MMF_Feedback.

◆ CustomRestoreInitialValues()

override void MoreMountains.Feedbacks.MMF_FeedbackBase.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_FeedbackBase.CustomStopFeedback ( Vector3  position,
float  feedbacksIntensity = 1 
)
protectedvirtual

Turns the target property object off on stop if needed

Parameters
position
feedbacksIntensity

Reimplemented from MoreMountains.Feedbacks.MMF_Feedback.

◆ FillTargets()

◆ InitializeTargets()

virtual void MoreMountains.Feedbacks.MMF_FeedbackBase.InitializeTargets ( )
protectedvirtual

Initializes each target in the list

◆ Instant()

virtual void MoreMountains.Feedbacks.MMF_FeedbackBase.Instant ( )
protectedvirtual

Plays an instant feedback

◆ OnValidate()

override void MoreMountains.Feedbacks.MMF_FeedbackBase.OnValidate ( )
virtual

On validate (if a value has changed in the inspector), we reinitialize what needs to be

Reimplemented from MoreMountains.Feedbacks.MMF_Feedback.

◆ PrepareTargets()

virtual void MoreMountains.Feedbacks.MMF_FeedbackBase.PrepareTargets ( )
virtual

Creates a new list, fills the targets, and initializes them

◆ SetValues()

virtual void MoreMountains.Feedbacks.MMF_FeedbackBase.SetValues ( float  time,
float  feedbacksIntensity,
Vector3  position 
)
protectedvirtual

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

Parameters
time

◆ Turn()

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

Turns the target object on or off

Parameters
status

◆ UpdateValueSequence()

virtual IEnumerator MoreMountains.Feedbacks.MMF_FeedbackBase.UpdateValueSequence ( float  feedbacksIntensity,
Vector3  position 
)
protectedvirtual

This coroutine will modify the values on the target property

Returns

Member Data Documentation

◆ _coroutine

Coroutine MoreMountains.Feedbacks.MMF_FeedbackBase._coroutine = null
protected

◆ _targets

List<MMF_FeedbackBaseTarget> MoreMountains.Feedbacks.MMF_FeedbackBase._targets
protected

◆ AllowAdditivePlays

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

◆ DisableOnStop

bool MoreMountains.Feedbacks.MMF_FeedbackBase.DisableOnStop = false

if this is true, the target object will be disabled on stop

◆ Duration

float MoreMountains.Feedbacks.MMF_FeedbackBase.Duration = 0.2f

how long the target property should change over time

◆ EndsOff

bool MoreMountains.Feedbacks.MMF_FeedbackBase.EndsOff = false

whether or not that target property should be turned off once the feedback is done playing

◆ FeedbackTypeAuthorized

bool MoreMountains.Feedbacks.MMF_FeedbackBase.FeedbackTypeAuthorized = true
static

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

◆ HasCustomInspectors

override bool MoreMountains.Feedbacks.MMF_FeedbackBase.HasCustomInspectors => true

◆ HasRandomness

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

◆ Mode

Modes MoreMountains.Feedbacks.MMF_FeedbackBase.Mode = Modes.OverTime

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

◆ OnlyPlayIfTargetIsActive

bool MoreMountains.Feedbacks.MMF_FeedbackBase.OnlyPlayIfTargetIsActive = false

if this is true, this feedback will only play if its target is active in hierarchy

◆ RelativeValues

bool MoreMountains.Feedbacks.MMF_FeedbackBase.RelativeValues = true

whether or not the values should be relative or not

◆ StartsOff

bool MoreMountains.Feedbacks.MMF_FeedbackBase.StartsOff = false

whether or not that target property should be turned off on start

Property Documentation

◆ FeedbackDuration

override float? MoreMountains.Feedbacks.MMF_FeedbackBase.FeedbackDuration
getset

the duration of this feedback is the duration of the target property, or 0 if instant


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