TopDown Engine  v4.1
MoreMountains.Feedbacks.MMF_Property Class Reference

This feedback will let you target (almost) any property, on any object in your scene. It also works on scriptable objects. Drag an object, select a property, and setup your feedback " + to update that property over time More...

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

Public Types

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

Public Attributes

override bool HasRandomness => true
 sets the inspector color for this feedback More...
 
override bool CanForceInitialValue => true
 
override bool ForceInitialValueDelayed => true
 
override bool HasCustomInspectors => true
 
MMPropertyReceiver Target
 the receiver to write the level to More...
 
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 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 DetermineInitialValueOnPlay = false
 if this is true, initial value will be computed for every play, otherwise only once, on initialization More...
 
MMTweenType LevelCurve = new MMTweenType(new AnimationCurve(new Keyframe(0, 0), new Keyframe(0.3f, 1f), new Keyframe(1, 0)))
 the curve to tween the intensity on More...
 
float RemapLevelZero = 0f
 the value to remap the intensity curve's 0 to More...
 
float RemapLevelOne = 1f
 the value to remap the intensity curve's 1 to More...
 
float InstantLevel
 the value to move the intensity to in instant mode More...
 
float ToDestinationLevel = 5f
 the value towards which to animate when in ToDestination 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 CustomInitialization (MMF_Player owner)
 On init we turn the target property off if needed More...
 
virtual void GetInitialIntensity ()
 Stores the current level of the target 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 IEnumerator ToDestinationSequence (float intensityMultiplier)
 This coroutine will animate the target property's value towards the defined ToDestinationLevel. Note that in RelativeValue mode, this ToDestinationLevel will be added to the initial value More...
 
virtual IEnumerator UpdateValueSequence (float intensityMultiplier)
 This coroutine will modify the values on the target property More...
 
virtual void SetValues (float time, float intensityMultiplier, float remapZero, float remapOne, bool applyRelative)
 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...
 
override void CustomRestoreInitialValues ()
 On restore, we put our object back at its initial position More...
 

Protected Attributes

float _initialIntensity
 
Coroutine _coroutine
 

Properties

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

Additional Inherited Members

Detailed Description

This feedback will let you target (almost) any property, on any object in your scene. It also works on scriptable objects. Drag an object, select a property, and setup your feedback " + to update that property over time

Member Enumeration Documentation

◆ Modes

the possible modes for this feedback

Enumerator
OverTime 
Instant 
ToDestination 

Member Function Documentation

◆ CustomInitialization()

override void MoreMountains.Feedbacks.MMF_Property.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_Property.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_Property.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_Property.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.

◆ GetInitialIntensity()

virtual void MoreMountains.Feedbacks.MMF_Property.GetInitialIntensity ( )
protectedvirtual

Stores the current level of the target

◆ SetValues()

virtual void MoreMountains.Feedbacks.MMF_Property.SetValues ( float  time,
float  intensityMultiplier,
float  remapZero,
float  remapOne,
bool  applyRelative 
)
protectedvirtual

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

Parameters
time

◆ ToDestinationSequence()

virtual IEnumerator MoreMountains.Feedbacks.MMF_Property.ToDestinationSequence ( float  intensityMultiplier)
protectedvirtual

This coroutine will animate the target property's value towards the defined ToDestinationLevel. Note that in RelativeValue mode, this ToDestinationLevel will be added to the initial value

Parameters
intensityMultiplier

◆ Turn()

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

Turns the target object on or off

Parameters
status

◆ UpdateValueSequence()

virtual IEnumerator MoreMountains.Feedbacks.MMF_Property.UpdateValueSequence ( float  intensityMultiplier)
protectedvirtual

This coroutine will modify the values on the target property

Returns

Member Data Documentation

◆ _coroutine

Coroutine MoreMountains.Feedbacks.MMF_Property._coroutine
protected

◆ _initialIntensity

float MoreMountains.Feedbacks.MMF_Property._initialIntensity
protected

◆ AllowAdditivePlays

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

◆ CanForceInitialValue

override bool MoreMountains.Feedbacks.MMF_Property.CanForceInitialValue => true

◆ DetermineInitialValueOnPlay

bool MoreMountains.Feedbacks.MMF_Property.DetermineInitialValueOnPlay = false

if this is true, initial value will be computed for every play, otherwise only once, on initialization

◆ Duration

float MoreMountains.Feedbacks.MMF_Property.Duration = 0.2f

how long the target property should change over time

◆ FeedbackTypeAuthorized

bool MoreMountains.Feedbacks.MMF_Property.FeedbackTypeAuthorized = true
static

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

◆ ForceInitialValueDelayed

override bool MoreMountains.Feedbacks.MMF_Property.ForceInitialValueDelayed => true

◆ HasCustomInspectors

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

◆ HasRandomness

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

sets the inspector color for this feedback

◆ InstantLevel

float MoreMountains.Feedbacks.MMF_Property.InstantLevel

the value to move the intensity to in instant mode

◆ LevelCurve

MMTweenType MoreMountains.Feedbacks.MMF_Property.LevelCurve = new MMTweenType(new AnimationCurve(new Keyframe(0, 0), new Keyframe(0.3f, 1f), new Keyframe(1, 0)))

the curve to tween the intensity on

◆ Mode

Modes MoreMountains.Feedbacks.MMF_Property.Mode = Modes.OverTime

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

◆ RelativeValues

bool MoreMountains.Feedbacks.MMF_Property.RelativeValues = true

whether or not the values should be relative or not

◆ RemapLevelOne

float MoreMountains.Feedbacks.MMF_Property.RemapLevelOne = 1f

the value to remap the intensity curve's 1 to

◆ RemapLevelZero

float MoreMountains.Feedbacks.MMF_Property.RemapLevelZero = 0f

the value to remap the intensity curve's 0 to

◆ StartsOff

bool MoreMountains.Feedbacks.MMF_Property.StartsOff = false

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

◆ Target

MMPropertyReceiver MoreMountains.Feedbacks.MMF_Property.Target

the receiver to write the level to

◆ ToDestinationLevel

float MoreMountains.Feedbacks.MMF_Property.ToDestinationLevel = 5f

the value towards which to animate when in ToDestination mode

Property Documentation

◆ FeedbackDuration

override float? MoreMountains.Feedbacks.MMF_Property.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: