TopDown Engine v4.5
Loading...
Searching...
No Matches
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 { OverTime , Instant }
 the possible modes for this feedback More...

Public Attributes

Renderer TargetRenderer
 the renderer on which to change texture offset on
int MaterialIndex = 0
 the material index
string MaterialPropertyName = "_MainTex_ST"
 the property name, for example _MainTex_ST, or _MainTex if you don't have UseMaterialPropertyBlocks set to true
Modes Mode = Modes.OverTime
 whether the feedback should affect the material instantly or over a period of time
float Duration = 0.2f
 how long the material should change over time
bool RelativeValues = true
 whether or not the values should be relative
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
bool UseMaterialPropertyBlocks = false
 if this is true, this component will use material property blocks instead of working on an instance of the material.
AnimationCurve OffsetCurve = new AnimationCurve(new Keyframe(0, 0), new Keyframe(0.3f, 1f), new Keyframe(1, 0))
 the curve to tween the offset on
Vector2 RemapZero = Vector2.zero
 the value to remap the offset 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
Vector2 RemapOne = Vector2.one
 the value to remap the offset 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
Vector2 InstantOffset
 the value to move the intensity to in instant mode

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 store our initial texture offset.
override void CustomPlayFeedback (Vector3 position, float feedbacksIntensity=1.0f)
 On Play we initiate our offset change.
virtual IEnumerator TransitionCo (float intensityMultiplier)
 This coroutine will modify the offset value over time.
virtual void SetMaterialValues (float time, float intensityMultiplier)
 Applies offset to the target material.
virtual void ApplyValue (Vector2 newValue)
 Applies the specified value to the material.
override void CustomStopFeedback (Vector3 position, float feedbacksIntensity=1)
 Stops this feedback.
override void CustomRestoreInitialValues ()
 On restore, we restore our initial state.

Protected Attributes

Vector2 _initialValue
Coroutine _coroutine
Vector2 _newValue
MaterialPropertyBlock _propertyBlock
Vector4 _propertyBlockVector

Properties

override bool HasAutomatedTargetAcquisition [get]
 sets the inspector color for this feedback
override float FeedbackDuration [get, set]
 the duration of this feedback is the duration of the transition
override bool HasRandomness [get]

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

On Play we initiate our offset change.

Parameters
position
feedbacksIntensity

◆ 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

◆ 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, 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_TextureOffset.RemapZero = Vector2.zero

the value to remap the offset 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

◆ 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

◆ HasAutomatedTargetAcquisition

override bool MoreMountains.Feedbacks.MMF_TextureOffset.HasAutomatedTargetAcquisition
get

sets the inspector color for this feedback

◆ HasRandomness

override bool MoreMountains.Feedbacks.MMF_TextureOffset.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_TextureOffset.cs