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

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

Inheritance diagram for MoreMountains.Feedbacks.MMF_ImageTextureScale:
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 HasRandomness => true
 sets the inspector color for this feedback More...
 
override bool HasAutomatedTargetAcquisition => true
 
Image TargetImage
 the UI Image on which to change texture scale 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 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 More...
 
Vector2 RemapOne = Vector2.one
 the value to remap the scale curve's 1 to More...
 
Vector2 InstantScale
 the value to move the intensity to in instant mode More...
 

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 scale More...
 
override void CustomPlayFeedback (Vector3 position, float feedbacksIntensity=1.0f)
 On Play we initiate our scale change More...
 
virtual IEnumerator TransitionCo (float intensityMultiplier)
 This coroutine will modify the scale value over time More...
 
virtual void SetMaterialValues (float time, float intensityMultiplier)
 Applies 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...
 

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 scale 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_ImageTextureScale.ApplyValue ( Vector2  newValue)
protectedvirtual

Applies the specified value to the material

Parameters
newValue

◆ AutomateTargetAcquisition()

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

On init we store our initial texture scale

Parameters
owner

Reimplemented from MoreMountains.Feedbacks.MMF_Feedback.

◆ CustomPlayFeedback()

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

On Play we initiate our scale change

Parameters
position
feedbacksIntensity

Implements MoreMountains.Feedbacks.MMF_Feedback.

◆ CustomStopFeedback()

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

Applies scale to the target material

Parameters
time

◆ TransitionCo()

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

This coroutine will modify the scale value over time

Returns

Member Data Documentation

◆ _coroutine

Coroutine MoreMountains.Feedbacks.MMF_ImageTextureScale._coroutine
protected

◆ _initialValue

Vector2 MoreMountains.Feedbacks.MMF_ImageTextureScale._initialValue
protected

◆ _material

Material MoreMountains.Feedbacks.MMF_ImageTextureScale._material
protected

◆ _newValue

Vector2 MoreMountains.Feedbacks.MMF_ImageTextureScale._newValue
protected

◆ AllowAdditivePlays

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

how long the material should change over time

◆ FeedbackTypeAuthorized

bool MoreMountains.Feedbacks.MMF_ImageTextureScale.FeedbackTypeAuthorized = true
static

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

◆ HasAutomatedTargetAcquisition

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

◆ HasRandomness

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

sets the inspector color for this feedback

◆ InstantScale

Vector2 MoreMountains.Feedbacks.MMF_ImageTextureScale.InstantScale

the value to move the intensity to in instant mode

◆ MaterialPropertyName

string MoreMountains.Feedbacks.MMF_ImageTextureScale.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_ImageTextureScale.MaterialPropertyType = MaterialPropertyTypes.Main

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

◆ Mode

Modes MoreMountains.Feedbacks.MMF_ImageTextureScale.Mode = Modes.OverTime

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

◆ RelativeValues

bool MoreMountains.Feedbacks.MMF_ImageTextureScale.RelativeValues = true

whether or not the values should be relative

◆ RemapOne

Vector2 MoreMountains.Feedbacks.MMF_ImageTextureScale.RemapOne = Vector2.one

the value to remap the scale curve's 1 to

◆ RemapZero

Vector2 MoreMountains.Feedbacks.MMF_ImageTextureScale.RemapZero = Vector2.zero

the value to remap the scale curve's 0 to

◆ ScaleCurve

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

the curve to tween the scale on

◆ TargetImage

Image MoreMountains.Feedbacks.MMF_ImageTextureScale.TargetImage

the UI Image on which to change texture scale on

Property Documentation

◆ FeedbackDuration

override float? MoreMountains.Feedbacks.MMF_ImageTextureScale.FeedbackDuration
getset

the duration of this feedback is the duration of the transition


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