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

This feedback will let you control values on a target ShaderController, letting you modify the behaviour and aspect of a shader driven material at runtime More...

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

Public Types

enum  Modes { Modes.OneTime, Modes.ToDestination }
 the different possible modes More...
 

Public Attributes

override bool HasRandomness => true
 sets the inspector color for this feedback More...
 
override bool HasAutomatedTargetAcquisition => true
 
Modes Mode = Modes.OneTime
 the mode this controller is in More...
 
ShaderController TargetShaderController
 the float controller to trigger a one time play on More...
 
List< ShaderControllerTargetShaderControllerList
 an optional list of float controllers to trigger a one time play on More...
 
bool RevertToInitialValueAfterEnd = false
 whether this should revert to original at the end More...
 
bool GetInitialValueOnOneTime = false
 whether or not to initialize the initial value to the current value on a OneTime play More...
 
float OneTimeDuration = 1f
 the duration of the One Time shake More...
 
float OneTimeAmplitude = 1f
 the amplitude of the One Time shake (this will be multiplied by the curve's height) More...
 
float OneTimeRemapMin = 0f
 the low value to remap the normalized curve value to More...
 
float OneTimeRemapMax = 1f
 the high value to remap the normalized curve value to More...
 
AnimationCurve OneTimeCurve = new AnimationCurve(new Keyframe(0, 0), new Keyframe(0.5f, 1), new Keyframe(1, 0))
 the curve to apply to the one time shake More...
 
float ToDestinationValue = 1f
 the new value towards which to move the current value More...
 
float ToDestinationDuration = 1f
 the duration over which to interpolate the target value More...
 
Color ToDestinationColor = Color.red
 the color to aim for (when targetting a Color property More...
 
AnimationCurve ToDestinationCurve = new AnimationCurve(new Keyframe(0, 0), new Keyframe(0.5f, 1), new Keyframe(1, 0))
 the curve over which to interpolate the value 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 grab our initial controller values More...
 
override void CustomPlayFeedback (Vector3 position, float feedbacksIntensity=1.0f)
 On play we trigger a OneTime or ToDestination play on our shader controller More...
 
virtual void PerformPlay (ShaderController shaderController, float intensityMultiplier)
 
override void CustomStopFeedback (Vector3 position, float feedbacksIntensity=1)
 Stops this feedback More...
 
override void CustomReset ()
 On reset we restore our initial values More...
 
virtual void PerformReset (ShaderController shaderController)
 
override void CustomRestoreInitialValues ()
 On restore, we restore our initial state More...
 

Protected Attributes

float _oneTimeDurationStorage
 
float _oneTimeAmplitudeStorage
 
float _oneTimeRemapMinStorage
 
float _oneTimeRemapMaxStorage
 
AnimationCurve _oneTimeCurveStorage
 
float _toDestinationValueStorage
 
float _toDestinationDurationStorage
 
AnimationCurve _toDestinationCurveStorage
 
bool _revertToInitialValueAfterEndStorage
 

Properties

override float? FeedbackDuration [get, set]
 the duration of this feedback is the duration of the one time hit More...
 

Additional Inherited Members

Detailed Description

This feedback will let you control values on a target ShaderController, letting you modify the behaviour and aspect of a shader driven material at runtime

Member Enumeration Documentation

◆ Modes

the different possible modes

Enumerator
OneTime 
ToDestination 

Member Function Documentation

◆ AutomateTargetAcquisition()

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

On init we grab our initial controller values

Parameters
owner

Reimplemented from MoreMountains.Feedbacks.MMF_Feedback.

◆ CustomPlayFeedback()

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

On play we trigger a OneTime or ToDestination play on our shader controller

Parameters
position
feedbacksIntensity

Implements MoreMountains.Feedbacks.MMF_Feedback.

◆ CustomReset()

override void MoreMountains.Feedbacks.MMF_ShaderController.CustomReset ( )
protectedvirtual

On reset we restore our initial values

Reimplemented from MoreMountains.Feedbacks.MMF_Feedback.

◆ CustomRestoreInitialValues()

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

On restore, we restore our initial state

Reimplemented from MoreMountains.Feedbacks.MMF_Feedback.

◆ CustomStopFeedback()

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

Stops this feedback

Parameters
position
feedbacksIntensity

Reimplemented from MoreMountains.Feedbacks.MMF_Feedback.

◆ PerformPlay()

virtual void MoreMountains.Feedbacks.MMF_ShaderController.PerformPlay ( ShaderController  shaderController,
float  intensityMultiplier 
)
protectedvirtual

◆ PerformReset()

virtual void MoreMountains.Feedbacks.MMF_ShaderController.PerformReset ( ShaderController  shaderController)
protectedvirtual

Member Data Documentation

◆ _oneTimeAmplitudeStorage

float MoreMountains.Feedbacks.MMF_ShaderController._oneTimeAmplitudeStorage
protected

◆ _oneTimeCurveStorage

AnimationCurve MoreMountains.Feedbacks.MMF_ShaderController._oneTimeCurveStorage
protected

◆ _oneTimeDurationStorage

float MoreMountains.Feedbacks.MMF_ShaderController._oneTimeDurationStorage
protected

◆ _oneTimeRemapMaxStorage

float MoreMountains.Feedbacks.MMF_ShaderController._oneTimeRemapMaxStorage
protected

◆ _oneTimeRemapMinStorage

float MoreMountains.Feedbacks.MMF_ShaderController._oneTimeRemapMinStorage
protected

◆ _revertToInitialValueAfterEndStorage

bool MoreMountains.Feedbacks.MMF_ShaderController._revertToInitialValueAfterEndStorage
protected

◆ _toDestinationCurveStorage

AnimationCurve MoreMountains.Feedbacks.MMF_ShaderController._toDestinationCurveStorage
protected

◆ _toDestinationDurationStorage

float MoreMountains.Feedbacks.MMF_ShaderController._toDestinationDurationStorage
protected

◆ _toDestinationValueStorage

float MoreMountains.Feedbacks.MMF_ShaderController._toDestinationValueStorage
protected

◆ FeedbackTypeAuthorized

bool MoreMountains.Feedbacks.MMF_ShaderController.FeedbackTypeAuthorized = true
static

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

◆ GetInitialValueOnOneTime

bool MoreMountains.Feedbacks.MMF_ShaderController.GetInitialValueOnOneTime = false

whether or not to initialize the initial value to the current value on a OneTime play

◆ HasAutomatedTargetAcquisition

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

◆ HasRandomness

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

sets the inspector color for this feedback

◆ Mode

Modes MoreMountains.Feedbacks.MMF_ShaderController.Mode = Modes.OneTime

the mode this controller is in

◆ OneTimeAmplitude

float MoreMountains.Feedbacks.MMF_ShaderController.OneTimeAmplitude = 1f

the amplitude of the One Time shake (this will be multiplied by the curve's height)

◆ OneTimeCurve

AnimationCurve MoreMountains.Feedbacks.MMF_ShaderController.OneTimeCurve = new AnimationCurve(new Keyframe(0, 0), new Keyframe(0.5f, 1), new Keyframe(1, 0))

the curve to apply to the one time shake

◆ OneTimeDuration

float MoreMountains.Feedbacks.MMF_ShaderController.OneTimeDuration = 1f

the duration of the One Time shake

◆ OneTimeRemapMax

float MoreMountains.Feedbacks.MMF_ShaderController.OneTimeRemapMax = 1f

the high value to remap the normalized curve value to

◆ OneTimeRemapMin

float MoreMountains.Feedbacks.MMF_ShaderController.OneTimeRemapMin = 0f

the low value to remap the normalized curve value to

◆ RevertToInitialValueAfterEnd

bool MoreMountains.Feedbacks.MMF_ShaderController.RevertToInitialValueAfterEnd = false

whether this should revert to original at the end

◆ TargetShaderController

ShaderController MoreMountains.Feedbacks.MMF_ShaderController.TargetShaderController

the float controller to trigger a one time play on

◆ TargetShaderControllerList

List<ShaderController> MoreMountains.Feedbacks.MMF_ShaderController.TargetShaderControllerList

an optional list of float controllers to trigger a one time play on

◆ ToDestinationColor

Color MoreMountains.Feedbacks.MMF_ShaderController.ToDestinationColor = Color.red

the color to aim for (when targetting a Color property

◆ ToDestinationCurve

AnimationCurve MoreMountains.Feedbacks.MMF_ShaderController.ToDestinationCurve = new AnimationCurve(new Keyframe(0, 0), new Keyframe(0.5f, 1), new Keyframe(1, 0))

the curve over which to interpolate the value

◆ ToDestinationDuration

float MoreMountains.Feedbacks.MMF_ShaderController.ToDestinationDuration = 1f

the duration over which to interpolate the target value

◆ ToDestinationValue

float MoreMountains.Feedbacks.MMF_ShaderController.ToDestinationValue = 1f

the new value towards which to move the current value

Property Documentation

◆ FeedbackDuration

override float? MoreMountains.Feedbacks.MMF_ShaderController.FeedbackDuration
getset

the duration of this feedback is the duration of the one time hit


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