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

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

Inheritance diagram for MoreMountains.Feedbacks.MMF_TextureOffset:
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 offset 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 OffsetCurve = new AnimationCurve(new Keyframe(0, 0), new Keyframe(0.3f, 1f), new Keyframe(1, 0))
 the curve to tween the offset on More...
 
Vector2 RemapZero = Vector2.zero
 the value to remap the offset curve's 0 to More...
 
Vector2 RemapOne = Vector2.one
 the value to remap the offset curve's 1 to More...
 
Vector2 InstantOffset
 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 initial texture offset More...
 
override void CustomPlayFeedback (Vector3 position, float feedbacksIntensity=1.0f)
 On Play we initiate our offset change More...
 
virtual IEnumerator TransitionCo (float intensityMultiplier)
 This coroutine will modify the offset value over time More...
 
virtual void SetMaterialValues (float time, float intensityMultiplier)
 Applies offset 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 offset 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_TextureOffset.ApplyValue ( Vector2  newValue)
protectedvirtual

Applies the specified value to the material

Parameters
newValue

◆ AutomateTargetAcquisition()

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

On init we store our initial texture offset

Parameters
owner

Reimplemented from MoreMountains.Feedbacks.MMF_Feedback.

◆ CustomPlayFeedback()

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

On Play we initiate our offset change

Parameters
position
feedbacksIntensity

Implements MoreMountains.Feedbacks.MMF_Feedback.

◆ CustomRestoreInitialValues()

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

On restore, we restore our initial state

Reimplemented from MoreMountains.Feedbacks.MMF_Feedback.

◆ CustomStopFeedback()

override void MoreMountains.Feedbacks.MMF_TextureOffset.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_TextureOffset.SetMaterialValues ( float  time,
float  intensityMultiplier 
)
protectedvirtual

Applies offset to the target material

Parameters
time

◆ TransitionCo()

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

This coroutine will modify the offset value over time

Returns

Member Data Documentation

◆ _coroutine

Coroutine MoreMountains.Feedbacks.MMF_TextureOffset._coroutine
protected

◆ _initialValue

Vector2 MoreMountains.Feedbacks.MMF_TextureOffset._initialValue
protected

◆ _newValue

Vector2 MoreMountains.Feedbacks.MMF_TextureOffset._newValue
protected

◆ _propertyBlock

MaterialPropertyBlock MoreMountains.Feedbacks.MMF_TextureOffset._propertyBlock
protected

◆ _propertyBlockVector

Vector4 MoreMountains.Feedbacks.MMF_TextureOffset._propertyBlockVector
protected

◆ AllowAdditivePlays

bool MoreMountains.Feedbacks.MMF_TextureOffset.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_TextureOffset.Duration = 0.2f

how long the material should change over time

◆ FeedbackTypeAuthorized

bool MoreMountains.Feedbacks.MMF_TextureOffset.FeedbackTypeAuthorized = true
static

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

◆ HasAutomatedTargetAcquisition

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

sets the inspector color for this feedback

◆ HasRandomness

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

◆ InstantOffset

Vector2 MoreMountains.Feedbacks.MMF_TextureOffset.InstantOffset

the value to move the intensity to in instant mode

◆ MaterialIndex

int MoreMountains.Feedbacks.MMF_TextureOffset.MaterialIndex = 0

the material index

◆ MaterialPropertyName

string MoreMountains.Feedbacks.MMF_TextureOffset.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_TextureOffset.Mode = Modes.OverTime

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

◆ OffsetCurve

AnimationCurve MoreMountains.Feedbacks.MMF_TextureOffset.OffsetCurve = new AnimationCurve(new Keyframe(0, 0), new Keyframe(0.3f, 1f), new Keyframe(1, 0))

the curve to tween the offset on

◆ RelativeValues

bool MoreMountains.Feedbacks.MMF_TextureOffset.RelativeValues = true

whether or not the values should be relative

◆ RemapOne

Vector2 MoreMountains.Feedbacks.MMF_TextureOffset.RemapOne = Vector2.one

the value to remap the offset curve's 1 to

◆ RemapZero

Vector2 MoreMountains.Feedbacks.MMF_TextureOffset.RemapZero = Vector2.zero

the value to remap the offset curve's 0 to

◆ TargetRenderer

Renderer MoreMountains.Feedbacks.MMF_TextureOffset.TargetRenderer

the renderer on which to change texture offset on

◆ UseMaterialPropertyBlocks

bool MoreMountains.Feedbacks.MMF_TextureOffset.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_TextureOffset.FeedbackDuration
getset

the duration of this feedback is the duration of the transition


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