TopDown Engine v4.5
Loading...
Searching...
No Matches
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

Classes

class  ExtraRendererData

Public Types

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

Public Member Functions

override void OnValidate ()
 On Validate, we migrate our deprecated animation curves to our tween types if needed.

Public Attributes

Renderer TargetRenderer
 the renderer to change the material on
List< ExtraRendererDataExtraTargetRenderers
 the renderer to change the material on
int MaterialID = 0
 the ID of the material to target on the renderer
string PropertyName
 the name of the property to set, as exposed by your material's shader (should be something like _Emission, or _Color, or _MainText, etc)
PropertyTypes PropertyType = PropertyTypes.Float
 the type of the property to set
Color NewColor = Color.red
 if the property is a color, the new color to set
float NewFloat = 1f
 if the property is a float, the new float to set
int NewInt
 if the property is an int, the new int to set
Texture NewTexture
 if the property is a texture, the new texture to set
Vector2 NewOffset
 if the property is a texture offset, the new offset to set
Vector2 NewScale
 if the property is a texture scale, the new scale to set
Vector4 NewVector
 if the property is a vector, the new vector4 to set
bool InterpolateValue = false
 whether or not to interpolate the value over time. If set to false, the change will be instant
float Duration = 2f
 the duration of the interpolation
MMTweenType InterpolationCurve = new MMTweenType(new AnimationCurve(new Keyframe(0, 0), new Keyframe(0.3f, 1f), new Keyframe(1, 0)), "InterpolateValue")
 the curve over which to interpolate the value

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 AutomateTargetAcquisition ()
 A method meant to be implemented per feedback letting you specify what happens (usually setting a target)
override void CustomInitialization (MMF_Player owner)
 On init we turn the sprite renderer off if needed.
override void CustomPlayFeedback (Vector3 position, float feedbacksIntensity=1.0f)
 On play we turn raycastTarget on or off.
virtual IEnumerator InterpolationSequence (float intensityMultiplier)
 An internal coroutine used to interpolate the value over time.
virtual void SetValueAtTime (float t, float intensityMultiplier)
 Sets the value of the property at a certain time.
override void CustomStopFeedback (Vector3 position, float feedbacksIntensity=1)
 Stops this feedback.
override void CustomRestoreInitialValues ()
 On restore, we restore our initial state.
virtual void SetColor (Color newColor)
virtual void SetFloat (float newFloat)
virtual void SetInt (int newInt)
virtual void SetTexture (Texture newTexture)
virtual void SetTextureOffset (Vector2 newOffset)
virtual void SetTextureScale (Vector2 newScale)
virtual void SetVector (Vector4 newVector)

Protected Attributes

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

Properties

override bool HasRandomness [get]
override bool HasCustomInspectors [get]
override bool HasAutomatedTargetAcquisition [get]
override float FeedbackDuration [get, set]

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

On play we turn raycastTarget on or off.

Parameters
position
feedbacksIntensity

◆ 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

◆ OnValidate()

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

On Validate, we migrate our deprecated animation curves to our tween types if needed.

Reimplemented from MoreMountains.Feedbacks.MMF_Feedback.

◆ SetColor()

virtual void MoreMountains.Feedbacks.MMF_MaterialSetProperty.SetColor ( Color newColor)
protectedvirtual

◆ SetFloat()

virtual void MoreMountains.Feedbacks.MMF_MaterialSetProperty.SetFloat ( float newFloat)
protectedvirtual

◆ SetInt()

virtual void MoreMountains.Feedbacks.MMF_MaterialSetProperty.SetInt ( int newInt)
protectedvirtual

◆ SetTexture()

virtual void MoreMountains.Feedbacks.MMF_MaterialSetProperty.SetTexture ( Texture newTexture)
protectedvirtual

◆ SetTextureOffset()

virtual void MoreMountains.Feedbacks.MMF_MaterialSetProperty.SetTextureOffset ( Vector2 newOffset)
protectedvirtual

◆ SetTextureScale()

virtual void MoreMountains.Feedbacks.MMF_MaterialSetProperty.SetTextureScale ( Vector2 newScale)
protectedvirtual

◆ 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

◆ SetVector()

virtual void MoreMountains.Feedbacks.MMF_MaterialSetProperty.SetVector ( Vector4 newVector)
protectedvirtual

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

Vector4 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

◆ ExtraTargetRenderers

List<ExtraRendererData> MoreMountains.Feedbacks.MMF_MaterialSetProperty.ExtraTargetRenderers

the renderer to change the material on

◆ FeedbackTypeAuthorized

bool MoreMountains.Feedbacks.MMF_MaterialSetProperty.FeedbackTypeAuthorized = true
static

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

◆ 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)), "InterpolateValue")

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

◆ PropertyName

string MoreMountains.Feedbacks.MMF_MaterialSetProperty.PropertyName

the name of the property to set, as exposed by your material's shader (should be something like _Emission, or _Color, or _MainText, etc)

◆ 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

◆ HasAutomatedTargetAcquisition

override bool MoreMountains.Feedbacks.MMF_MaterialSetProperty.HasAutomatedTargetAcquisition
get

◆ HasCustomInspectors

override bool MoreMountains.Feedbacks.MMF_MaterialSetProperty.HasCustomInspectors
get

◆ HasRandomness

override bool MoreMountains.Feedbacks.MMF_MaterialSetProperty.HasRandomness
get

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