TopDown Engine v4.5
Loading...
Searching...
No Matches
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_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 { OverTime , Instant , ToDestination }
 the possible modes for this feedback More...

Public Member Functions

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

Public Attributes

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

Static Public Attributes

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

Protected Member Functions

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

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
override bool HasRandomness [get]
override bool HasCustomInspectors [get]

Member Enumeration Documentation

◆ Modes

the possible modes for this feedback

Enumerator
OverTime 
Instant 
ToDestination 

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 )
protected

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

Parameters
position
feedbacksIntensity

◆ 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()

void MoreMountains.Feedbacks.MMF_FeedbackBase.FillTargets ( )
abstractprotected

Fills our list of targets, meant to be extended.

◆ 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,
Modes mode = Modes::OverTime )
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

◆ UpdateValueOverTimeCo()

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

This coroutine will modify the values on the target property.

Returns

◆ UpdateValueToDestinationCo()

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

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

◆ 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 = false

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

◆ HasCustomInspectors

override bool MoreMountains.Feedbacks.MMF_FeedbackBase.HasCustomInspectors
get

◆ HasRandomness

override bool MoreMountains.Feedbacks.MMF_FeedbackBase.HasRandomness
get

The documentation for this class was generated from the following file:
  • H:/Code/MoreMountains/topdownengine/Assets/TopDownEngine/ThirdParty/MoreMountains/MMFeedbacks/MMFeedbacksForThirdParty/MMTools/MMRadio/MMF_FeedbackBase.cs