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

This feedback will let you set a property on the target renderer's material More...

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

Public Types

enum  PropertyTypes {
  PropertyTypes.Color, PropertyTypes.Float, PropertyTypes.Integer, PropertyTypes.Texture,
  PropertyTypes.TextureOffset, PropertyTypes.TextureScale, PropertyTypes.Vector
}
 

Public Attributes

override bool HasRandomness => true
 
override bool HasCustomInspectors => true
 
override bool HasAutomatedTargetAcquisition => true
 
Renderer TargetRenderer
 the renderer to change the material on More...
 
int MaterialID = 0
 the ID of the material to target on the renderer More...
 
string PropertyID
 the ID of the property to set, as exposed by the Visual Effect Graph More...
 
PropertyTypes PropertyType = PropertyTypes.Float
 the type of the property to set More...
 
Color NewColor = Color.red
 if the property is a color, the new color to set More...
 
float NewFloat = 1f
 if the property is a float, the new float to set More...
 
int NewInt
 if the property is an int, the new int to set More...
 
Texture NewTexture
 if the property is a texture, the new texture to set More...
 
Vector2 NewOffset
 if the property is a texture offset, the new offset to set More...
 
Vector2 NewScale
 if the property is a texture scale, the new scale to set More...
 
Vector4 NewVector
 if the property is a vector, the new vector4 to set More...
 
bool InterpolateValue = false
 whether or not to interpolate the value over time. If set to false, the change will be instant More...
 
float Duration = 2f
 the duration of the interpolation More...
 
MMTweenType InterpolationCurve = new MMTweenType(new AnimationCurve(new Keyframe(0, 0), new Keyframe(0.3f, 1f), 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 turn the sprite renderer off if needed More...
 
override void CustomPlayFeedback (Vector3 position, float feedbacksIntensity=1.0f)
 On play we turn raycastTarget on or off More...
 
virtual IEnumerator InterpolationSequence (float intensityMultiplier)
 An internal coroutine used to interpolate the value over time More...
 
virtual void SetValueAtTime (float t, float intensityMultiplier)
 Sets the value of the property at a certain time More...
 
override void CustomStopFeedback (Vector3 position, float feedbacksIntensity=1)
 Stops this feedback More...
 
override void CustomRestoreInitialValues ()
 On restore, we restore our initial state More...
 

Protected Attributes

int _propertyID
 
Color _initialColor
 
float _initialFloat
 
int _initialInt
 
Texture _initialTexture
 
Vector2 _initialOffset
 
Vector2 _initialScale
 
Vector4 _initialVector
 
Coroutine _coroutine
 
Color _newColor
 
Vector2 _newVector2
 
Vector2 _newVector4
 

Properties

override float? FeedbackDuration [get, set]
 

Additional Inherited Members

Detailed Description

This feedback will let you set a property on the target renderer's material

Member Enumeration Documentation

◆ PropertyTypes

Enumerator
Color 
Float 
Integer 
Texture 
TextureOffset 
TextureScale 
Vector 

Member Function Documentation

◆ AutomateTargetAcquisition()

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

On init we turn the sprite renderer off if needed

Parameters
owner

Reimplemented from MoreMountains.Feedbacks.MMF_Feedback.

◆ CustomPlayFeedback()

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

On play we turn raycastTarget on or off

Parameters
position
feedbacksIntensity

Implements MoreMountains.Feedbacks.MMF_Feedback.

◆ CustomRestoreInitialValues()

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

On restore, we restore our initial state

Reimplemented from MoreMountains.Feedbacks.MMF_Feedback.

◆ CustomStopFeedback()

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

Stops this feedback

Parameters
position
feedbacksIntensity

Reimplemented from MoreMountains.Feedbacks.MMF_Feedback.

◆ InterpolationSequence()

virtual IEnumerator MoreMountains.Feedbacks.MMF_MaterialSetProperty.InterpolationSequence ( float  intensityMultiplier)
protectedvirtual

An internal coroutine used to interpolate the value over time

Parameters
intensityMultiplier
Returns

◆ SetValueAtTime()

virtual void MoreMountains.Feedbacks.MMF_MaterialSetProperty.SetValueAtTime ( float  t,
float  intensityMultiplier 
)
protectedvirtual

Sets the value of the property at a certain time

Parameters
t
intensityMultiplier

Member Data Documentation

◆ _coroutine

Coroutine MoreMountains.Feedbacks.MMF_MaterialSetProperty._coroutine
protected

◆ _initialColor

Color MoreMountains.Feedbacks.MMF_MaterialSetProperty._initialColor
protected

◆ _initialFloat

float MoreMountains.Feedbacks.MMF_MaterialSetProperty._initialFloat
protected

◆ _initialInt

int MoreMountains.Feedbacks.MMF_MaterialSetProperty._initialInt
protected

◆ _initialOffset

Vector2 MoreMountains.Feedbacks.MMF_MaterialSetProperty._initialOffset
protected

◆ _initialScale

Vector2 MoreMountains.Feedbacks.MMF_MaterialSetProperty._initialScale
protected

◆ _initialTexture

Texture MoreMountains.Feedbacks.MMF_MaterialSetProperty._initialTexture
protected

◆ _initialVector

Vector4 MoreMountains.Feedbacks.MMF_MaterialSetProperty._initialVector
protected

◆ _newColor

Color MoreMountains.Feedbacks.MMF_MaterialSetProperty._newColor
protected

◆ _newVector2

Vector2 MoreMountains.Feedbacks.MMF_MaterialSetProperty._newVector2
protected

◆ _newVector4

Vector2 MoreMountains.Feedbacks.MMF_MaterialSetProperty._newVector4
protected

◆ _propertyID

int MoreMountains.Feedbacks.MMF_MaterialSetProperty._propertyID
protected

◆ Duration

float MoreMountains.Feedbacks.MMF_MaterialSetProperty.Duration = 2f

the duration of the interpolation

◆ FeedbackTypeAuthorized

bool MoreMountains.Feedbacks.MMF_MaterialSetProperty.FeedbackTypeAuthorized = true
static

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

◆ HasAutomatedTargetAcquisition

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

◆ HasCustomInspectors

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

◆ HasRandomness

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

◆ InterpolateValue

bool MoreMountains.Feedbacks.MMF_MaterialSetProperty.InterpolateValue = false

whether or not to interpolate the value over time. If set to false, the change will be instant

◆ InterpolationCurve

MMTweenType MoreMountains.Feedbacks.MMF_MaterialSetProperty.InterpolationCurve = new MMTweenType(new AnimationCurve(new Keyframe(0, 0), new Keyframe(0.3f, 1f), new Keyframe(1, 0)))

the curve over which to interpolate the value

◆ MaterialID

int MoreMountains.Feedbacks.MMF_MaterialSetProperty.MaterialID = 0

the ID of the material to target on the renderer

◆ NewColor

Color MoreMountains.Feedbacks.MMF_MaterialSetProperty.NewColor = Color.red

if the property is a color, the new color to set

◆ NewFloat

float MoreMountains.Feedbacks.MMF_MaterialSetProperty.NewFloat = 1f

if the property is a float, the new float to set

◆ NewInt

int MoreMountains.Feedbacks.MMF_MaterialSetProperty.NewInt

if the property is an int, the new int to set

◆ NewOffset

Vector2 MoreMountains.Feedbacks.MMF_MaterialSetProperty.NewOffset

if the property is a texture offset, the new offset to set

◆ NewScale

Vector2 MoreMountains.Feedbacks.MMF_MaterialSetProperty.NewScale

if the property is a texture scale, the new scale to set

◆ NewTexture

Texture MoreMountains.Feedbacks.MMF_MaterialSetProperty.NewTexture

if the property is a texture, the new texture to set

◆ NewVector

Vector4 MoreMountains.Feedbacks.MMF_MaterialSetProperty.NewVector

if the property is a vector, the new vector4 to set

◆ PropertyID

string MoreMountains.Feedbacks.MMF_MaterialSetProperty.PropertyID

the ID of the property to set, as exposed by the Visual Effect Graph

◆ PropertyType

PropertyTypes MoreMountains.Feedbacks.MMF_MaterialSetProperty.PropertyType = PropertyTypes.Float

the type of the property to set

◆ TargetRenderer

Renderer MoreMountains.Feedbacks.MMF_MaterialSetProperty.TargetRenderer

the renderer to change the material on

Property Documentation

◆ FeedbackDuration

override float? MoreMountains.Feedbacks.MMF_MaterialSetProperty.FeedbackDuration
getset

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