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

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

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

Public Types

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

Public Attributes

override bool HasAutomatedTargetAcquisition => true
 sets the inspector color for this feedback More...
 
Image TargetImage
 the UI Image on which to change texture offset on More...
 
MaterialPropertyTypes MaterialPropertyType = MaterialPropertyTypes.Main
 whether to target the main texture property, or one specified in MaterialPropertyName 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...
 
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...
 

Protected Attributes

Vector2 _initialValue
 
Coroutine _coroutine
 
Vector2 _newValue
 
Material _material
 

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 UI Image over time

Member Enumeration Documentation

◆ MaterialPropertyTypes

◆ Modes

the possible modes for this feedback

Enumerator
OverTime 
Instant 

Member Function Documentation

◆ ApplyValue()

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

Applies the specified value to the material

Parameters
newValue

◆ AutomateTargetAcquisition()

override void MoreMountains.Feedbacks.MMF_ImageTextureOffset.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_ImageTextureOffset.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_ImageTextureOffset.CustomPlayFeedback ( Vector3  position,
float  feedbacksIntensity = 1.0f 
)
protectedvirtual

On Play we initiate our offset change

Parameters
position
feedbacksIntensity

Implements MoreMountains.Feedbacks.MMF_Feedback.

◆ CustomStopFeedback()

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

Applies offset to the target material

Parameters
time

◆ TransitionCo()

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

This coroutine will modify the offset value over time

Returns

Member Data Documentation

◆ _coroutine

Coroutine MoreMountains.Feedbacks.MMF_ImageTextureOffset._coroutine
protected

◆ _initialValue

Vector2 MoreMountains.Feedbacks.MMF_ImageTextureOffset._initialValue
protected

◆ _material

Material MoreMountains.Feedbacks.MMF_ImageTextureOffset._material
protected

◆ _newValue

Vector2 MoreMountains.Feedbacks.MMF_ImageTextureOffset._newValue
protected

◆ AllowAdditivePlays

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

how long the material should change over time

◆ FeedbackTypeAuthorized

bool MoreMountains.Feedbacks.MMF_ImageTextureOffset.FeedbackTypeAuthorized = true
static

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

◆ HasAutomatedTargetAcquisition

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

sets the inspector color for this feedback

◆ HasRandomness

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

◆ InstantOffset

Vector2 MoreMountains.Feedbacks.MMF_ImageTextureOffset.InstantOffset

the value to move the intensity to in instant mode

◆ MaterialPropertyName

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

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

◆ MaterialPropertyType

MaterialPropertyTypes MoreMountains.Feedbacks.MMF_ImageTextureOffset.MaterialPropertyType = MaterialPropertyTypes.Main

whether to target the main texture property, or one specified in MaterialPropertyName

◆ Mode

Modes MoreMountains.Feedbacks.MMF_ImageTextureOffset.Mode = Modes.OverTime

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

◆ OffsetCurve

AnimationCurve MoreMountains.Feedbacks.MMF_ImageTextureOffset.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_ImageTextureOffset.RelativeValues = true

whether or not the values should be relative

◆ RemapOne

Vector2 MoreMountains.Feedbacks.MMF_ImageTextureOffset.RemapOne = Vector2.one

the value to remap the offset curve's 1 to

◆ RemapZero

Vector2 MoreMountains.Feedbacks.MMF_ImageTextureOffset.RemapZero = Vector2.zero

the value to remap the offset curve's 0 to

◆ TargetImage

Image MoreMountains.Feedbacks.MMF_ImageTextureOffset.TargetImage

the UI Image on which to change texture offset on

Property Documentation

◆ FeedbackDuration

override float? MoreMountains.Feedbacks.MMF_ImageTextureOffset.FeedbackDuration
getset

the duration of this feedback is the duration of the transition


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