Feel 5.9.1
The best way to improve your game's feel and make it extra juicy
Loading...
Searching...
No Matches
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 { OverTime , Instant , ToDestination }
 the possible modes for this feedback More...

Public Member Functions

override void OnValidate ()
 On Validate, we init our curves conditions if needed.

Public Attributes

MMPropertyReceiver Target
 the receiver to write the level to
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 RelativeValues = true
 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 DetermineInitialValueOnPlay = false
 if this is true, initial value will be computed for every play, otherwise only once, on initialization
MMTweenType LevelCurve = new MMTweenType(new AnimationCurve(new Keyframe(0, 0), new Keyframe(0.3f, 1f), new Keyframe(1, 0)), "", "Mode", (int)Modes.OverTime, (int)Modes.ToDestination)
 the curve to tween the intensity on
float RemapLevelZero = 0f
 the value to remap the intensity curve's 0 to
float RemapLevelOne = 1f
 the value to remap the intensity curve's 1 to
float InstantLevel
 the value to move the intensity to in instant mode
float ToDestinationLevel = 5f
 the value towards which to animate when in ToDestination mode

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.
virtual void GetInitialIntensity ()
 Stores the current level of the target.
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 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.
virtual IEnumerator UpdateValueSequence (float intensityMultiplier)
 This coroutine will modify the values on the target property.
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)
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.
override void CustomRestoreInitialValues ()
 On restore, we put our object back at its initial position.

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
override bool HasRandomness [get]
 sets the inspector color for this feedback
override bool CanForceInitialValue [get]
override bool ForceInitialValueDelayed [get]
override bool HasCustomInspectors [get]

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 )
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_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.

◆ OnValidate()

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

On Validate, we init our curves conditions if needed.

Reimplemented from MoreMountains.Feedbacks.MMF_Feedback.

◆ 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

◆ 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

◆ 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)), "", "Mode", (int)Modes.OverTime, (int)Modes.ToDestination)

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

◆ CanForceInitialValue

override bool MoreMountains.Feedbacks.MMF_Property.CanForceInitialValue
get

◆ 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

◆ ForceInitialValueDelayed

override bool MoreMountains.Feedbacks.MMF_Property.ForceInitialValueDelayed
get

◆ HasCustomInspectors

override bool MoreMountains.Feedbacks.MMF_Property.HasCustomInspectors
get

◆ HasRandomness

override bool MoreMountains.Feedbacks.MMF_Property.HasRandomness
get

sets the inspector color for this feedback


The documentation for this class was generated from the following file:
  • H:/Code/MoreMountains/feel/Assets/Feel/MMFeedbacks/MMFeedbacksForThirdParty/MMTools/Feedbacks/MMF_Property.cs