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

This feedback will let you control the texture scale of a target material over time More...

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

Public Types

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

Public Attributes

override bool HasAutomatedTargetAcquisition => true
 sets the inspector color for this feedback More...
 
Renderer TargetRenderer
 the renderer on which to change texture scale on More...
 
int MaterialIndex = 0
 the material index More...
 
string MaterialPropertyName = "_MainTex_ST"
 the property name, for example _MainTex_ST, or _MainTex if you don't have UseMaterialPropertyBlocks set to true More...
 
Modes Mode = Modes.OverTime
 whether the feedback should affect the material instantly or over a period of time More...
 
float Duration = 0.2f
 how long the material should change over time More...
 
bool RelativeValues = true
 whether or not the values should be relative 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 UseMaterialPropertyBlocks = false
 if this is true, this component will use material property blocks instead of working on an instance of the material. More...
 
AnimationCurve ScaleCurve = new AnimationCurve(new Keyframe(0, 0), new Keyframe(0.3f, 1f), new Keyframe(1, 0))
 the curve to tween the scale on More...
 
Vector2 RemapZero = Vector2.zero
 the value to remap the scale curve's 0 to, randomized between its min and max - put the same value in both min and max if you don't want any randomness More...
 
Vector2 RemapOne = Vector2.one
 the value to remap the scale curve's 1 to, randomized between its min and max - put the same value in both min and max if you don't want any randomness More...
 
Vector2 InstantScale
 the value to move the intensity to in instant mode More...
 
override bool HasRandomness => true
 

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 store our texture scale More...
 
override void CustomPlayFeedback (Vector3 position, float feedbacksIntensity=1.0f)
 On Play we modify our texture scale More...
 
virtual IEnumerator TransitionCo (float intensityMultiplier)
 This coroutine will animate the target material's scale over time More...
 
virtual void SetMaterialValues (float time, float intensityMultiplier)
 Applies the scale to the target material More...
 
virtual void ApplyValue (Vector2 newValue)
 Applies the specified value to the material 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

Vector2 _initialValue
 
Coroutine _coroutine
 
Vector2 _newValue
 
MaterialPropertyBlock _propertyBlock
 
Vector4 _propertyBlockVector
 

Properties

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

Additional Inherited Members

Detailed Description

This feedback will let you control the texture scale of a target material over time

Member Enumeration Documentation

◆ Modes

the possible modes for this feedback

Enumerator
OverTime 
Instant 

Member Function Documentation

◆ ApplyValue()

virtual void MoreMountains.Feedbacks.MMF_TextureScale.ApplyValue ( Vector2  newValue)
protectedvirtual

Applies the specified value to the material

Parameters
newValue

◆ AutomateTargetAcquisition()

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

On init we store our texture scale

Parameters
owner

Reimplemented from MoreMountains.Feedbacks.MMF_Feedback.

◆ CustomPlayFeedback()

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

On Play we modify our texture scale

Parameters
position
feedbacksIntensity

Implements MoreMountains.Feedbacks.MMF_Feedback.

◆ CustomRestoreInitialValues()

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

On restore, we restore our initial state

Reimplemented from MoreMountains.Feedbacks.MMF_Feedback.

◆ CustomStopFeedback()

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

Stops this feedback

Parameters
position
feedbacksIntensity

Reimplemented from MoreMountains.Feedbacks.MMF_Feedback.

◆ SetMaterialValues()

virtual void MoreMountains.Feedbacks.MMF_TextureScale.SetMaterialValues ( float  time,
float  intensityMultiplier 
)
protectedvirtual

Applies the scale to the target material

Parameters
time

◆ TransitionCo()

virtual IEnumerator MoreMountains.Feedbacks.MMF_TextureScale.TransitionCo ( float  intensityMultiplier)
protectedvirtual

This coroutine will animate the target material's scale over time

Returns

Member Data Documentation

◆ _coroutine

Coroutine MoreMountains.Feedbacks.MMF_TextureScale._coroutine
protected

◆ _initialValue

Vector2 MoreMountains.Feedbacks.MMF_TextureScale._initialValue
protected

◆ _newValue

Vector2 MoreMountains.Feedbacks.MMF_TextureScale._newValue
protected

◆ _propertyBlock

MaterialPropertyBlock MoreMountains.Feedbacks.MMF_TextureScale._propertyBlock
protected

◆ _propertyBlockVector

Vector4 MoreMountains.Feedbacks.MMF_TextureScale._propertyBlockVector
protected

◆ AllowAdditivePlays

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

◆ Duration

float MoreMountains.Feedbacks.MMF_TextureScale.Duration = 0.2f

how long the material should change over time

◆ FeedbackTypeAuthorized

bool MoreMountains.Feedbacks.MMF_TextureScale.FeedbackTypeAuthorized = true
static

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

◆ HasAutomatedTargetAcquisition

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

sets the inspector color for this feedback

◆ HasRandomness

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

◆ InstantScale

Vector2 MoreMountains.Feedbacks.MMF_TextureScale.InstantScale

the value to move the intensity to in instant mode

◆ MaterialIndex

int MoreMountains.Feedbacks.MMF_TextureScale.MaterialIndex = 0

the material index

◆ MaterialPropertyName

string MoreMountains.Feedbacks.MMF_TextureScale.MaterialPropertyName = "_MainTex_ST"

the property name, for example _MainTex_ST, or _MainTex if you don't have UseMaterialPropertyBlocks set to true

◆ Mode

Modes MoreMountains.Feedbacks.MMF_TextureScale.Mode = Modes.OverTime

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

◆ RelativeValues

bool MoreMountains.Feedbacks.MMF_TextureScale.RelativeValues = true

whether or not the values should be relative

◆ RemapOne

Vector2 MoreMountains.Feedbacks.MMF_TextureScale.RemapOne = Vector2.one

the value to remap the scale curve's 1 to, randomized between its min and max - put the same value in both min and max if you don't want any randomness

◆ RemapZero

Vector2 MoreMountains.Feedbacks.MMF_TextureScale.RemapZero = Vector2.zero

the value to remap the scale curve's 0 to, randomized between its min and max - put the same value in both min and max if you don't want any randomness

◆ ScaleCurve

AnimationCurve MoreMountains.Feedbacks.MMF_TextureScale.ScaleCurve = new AnimationCurve(new Keyframe(0, 0), new Keyframe(0.3f, 1f), new Keyframe(1, 0))

the curve to tween the scale on

◆ TargetRenderer

Renderer MoreMountains.Feedbacks.MMF_TextureScale.TargetRenderer

the renderer on which to change texture scale on

◆ UseMaterialPropertyBlocks

bool MoreMountains.Feedbacks.MMF_TextureScale.UseMaterialPropertyBlocks = false

if this is true, this component will use material property blocks instead of working on an instance of the material.

Property Documentation

◆ FeedbackDuration

override float? MoreMountains.Feedbacks.MMF_TextureScale.FeedbackDuration
getset

the duration of this feedback is the duration of the transition


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