Infinite Runner Engine v1.9
Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
MoreMountains.Feedbacks.MMBlink Class Reference

Add this class to a GameObject to make it blink, either by enabling/disabling a gameobject, changing its alpha, emission intensity, or a value on a shader) More...

Inheritance diagram for MoreMountains.Feedbacks.MMBlink:

Public Types

enum  States { On , Off }
 the possible states of the blinking object More...
 
enum  Methods { SetGameObjectActive , MaterialAlpha , MaterialEmissionIntensity , ShaderFloatValue }
 the possible methods to blink an object More...
 

Public Member Functions

virtual float GetTime ()
 
virtual float GetDeltaTime ()
 
virtual void ToggleBlinking ()
 Makes the object blink if it wasn't already blinking, stops it otherwise More...
 
virtual void StartBlinking ()
 Makes the object start blinking More...
 
virtual void StopBlinking ()
 Makes the object stop blinking More...
 

Public Attributes

Methods Method = Methods.SetGameObjectActive
 the selected method to blink the target object More...
 
GameObject TargetGameObject
 the object to set active/inactive if that method was chosen More...
 
Renderer TargetRenderer
 the target renderer to work with More...
 
string ShaderPropertyName = "_Color"
 the shader property to alter a float on More...
 
float OffValue = 0f
 the value to apply when blinking is off More...
 
float OnValue = 1f
 the value to apply when blinking is on More...
 
bool LerpValue = true
 whether to lerp these values or not More...
 
AnimationCurve Curve = new AnimationCurve(new Keyframe(0, 0), new Keyframe(0.3f, 1.05f), new Keyframe(1, 0))
 the curve to apply to the lerping 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...
 
bool Blinking = true
 whether the object should blink or not More...
 
bool ForceStateOnExit = false
 whether or not to force a certain state on exit More...
 
States StateOnExit = States.On
 the state to apply on exit More...
 
TimescaleModes TimescaleMode = TimescaleModes.Scaled
 whether or not this MMBlink should operate on unscaled time More...
 
int RepeatCount = 0
 how many times the sequence should repeat (-1 : infinite) More...
 
List< BlinkPhasePhases
 The list of phases to apply blinking with. More...
 
bool ToggleBlinkingButton
 Test button. More...
 
bool StartBlinkingButton
 Test button. More...
 
bool StopBlinkingButton
 Test button. More...
 
bool Active = false
 is the blinking object in an active state right now? More...
 
int CurrentPhaseIndex = 0
 the index of the phase we're currently in More...
 

Protected Member Functions

virtual void Update ()
 On Update, we blink if we are supposed to More...
 
virtual void DetermineState ()
 Determines the current phase and determines whether the object should be active or inactive More...
 
virtual void Blink ()
 Blinks the object based on its computed state More...
 
virtual void ApplyBlink (bool active, float value)
 
virtual void DetermineCurrentPhase ()
 Determines the current phase index based on phase durations More...
 
virtual void OnEnable ()
 On enable, initializes blink properties More...
 
virtual void InitializeBlinkProperties ()
 Resets counters and grabs properties and initial colors More...
 
virtual void ResetBlinkProperties ()
 Resets blinking properties to original values More...
 

Protected Attributes

float _lastBlinkAt = 0f
 
float _currentPhaseStartedAt = 0f
 
float _currentBlinkDuration
 
float _currentLerpDuration
 
int _propertyID
 
float _initialShaderFloatValue
 
Color _initialColor
 
Color _currentColor
 
int _repeatCount
 
MaterialPropertyBlock _propertyBlock
 

Detailed Description

Add this class to a GameObject to make it blink, either by enabling/disabling a gameobject, changing its alpha, emission intensity, or a value on a shader)

Member Enumeration Documentation

◆ Methods

the possible methods to blink an object

Enumerator
SetGameObjectActive 
MaterialAlpha 
MaterialEmissionIntensity 
ShaderFloatValue 

◆ States

the possible states of the blinking object

Enumerator
On 
Off 

Member Function Documentation

◆ ApplyBlink()

virtual void MoreMountains.Feedbacks.MMBlink.ApplyBlink ( bool  active,
float  value 
)
protectedvirtual

◆ Blink()

virtual void MoreMountains.Feedbacks.MMBlink.Blink ( )
protectedvirtual

Blinks the object based on its computed state

◆ DetermineCurrentPhase()

virtual void MoreMountains.Feedbacks.MMBlink.DetermineCurrentPhase ( )
protectedvirtual

Determines the current phase index based on phase durations

◆ DetermineState()

virtual void MoreMountains.Feedbacks.MMBlink.DetermineState ( )
protectedvirtual

Determines the current phase and determines whether the object should be active or inactive

◆ GetDeltaTime()

virtual float MoreMountains.Feedbacks.MMBlink.GetDeltaTime ( )
virtual

◆ GetTime()

virtual float MoreMountains.Feedbacks.MMBlink.GetTime ( )
virtual

◆ InitializeBlinkProperties()

virtual void MoreMountains.Feedbacks.MMBlink.InitializeBlinkProperties ( )
protectedvirtual

Resets counters and grabs properties and initial colors

◆ OnEnable()

virtual void MoreMountains.Feedbacks.MMBlink.OnEnable ( )
protectedvirtual

On enable, initializes blink properties

◆ ResetBlinkProperties()

virtual void MoreMountains.Feedbacks.MMBlink.ResetBlinkProperties ( )
protectedvirtual

Resets blinking properties to original values

◆ StartBlinking()

virtual void MoreMountains.Feedbacks.MMBlink.StartBlinking ( )
virtual

Makes the object start blinking

◆ StopBlinking()

virtual void MoreMountains.Feedbacks.MMBlink.StopBlinking ( )
virtual

Makes the object stop blinking

◆ ToggleBlinking()

virtual void MoreMountains.Feedbacks.MMBlink.ToggleBlinking ( )
virtual

Makes the object blink if it wasn't already blinking, stops it otherwise

◆ Update()

virtual void MoreMountains.Feedbacks.MMBlink.Update ( )
protectedvirtual

On Update, we blink if we are supposed to

Member Data Documentation

◆ _currentBlinkDuration

float MoreMountains.Feedbacks.MMBlink._currentBlinkDuration
protected

◆ _currentColor

Color MoreMountains.Feedbacks.MMBlink._currentColor
protected

◆ _currentLerpDuration

float MoreMountains.Feedbacks.MMBlink._currentLerpDuration
protected

◆ _currentPhaseStartedAt

float MoreMountains.Feedbacks.MMBlink._currentPhaseStartedAt = 0f
protected

◆ _initialColor

Color MoreMountains.Feedbacks.MMBlink._initialColor
protected

◆ _initialShaderFloatValue

float MoreMountains.Feedbacks.MMBlink._initialShaderFloatValue
protected

◆ _lastBlinkAt

float MoreMountains.Feedbacks.MMBlink._lastBlinkAt = 0f
protected

◆ _propertyBlock

MaterialPropertyBlock MoreMountains.Feedbacks.MMBlink._propertyBlock
protected

◆ _propertyID

int MoreMountains.Feedbacks.MMBlink._propertyID
protected

◆ _repeatCount

int MoreMountains.Feedbacks.MMBlink._repeatCount
protected

◆ Active

bool MoreMountains.Feedbacks.MMBlink.Active = false

is the blinking object in an active state right now?

◆ Blinking

bool MoreMountains.Feedbacks.MMBlink.Blinking = true

whether the object should blink or not

◆ CurrentPhaseIndex

int MoreMountains.Feedbacks.MMBlink.CurrentPhaseIndex = 0

the index of the phase we're currently in

◆ Curve

AnimationCurve MoreMountains.Feedbacks.MMBlink.Curve = new AnimationCurve(new Keyframe(0, 0), new Keyframe(0.3f, 1.05f), new Keyframe(1, 0))

the curve to apply to the lerping

◆ ForceStateOnExit

bool MoreMountains.Feedbacks.MMBlink.ForceStateOnExit = false

whether or not to force a certain state on exit

◆ LerpValue

bool MoreMountains.Feedbacks.MMBlink.LerpValue = true

whether to lerp these values or not

◆ Method

Methods MoreMountains.Feedbacks.MMBlink.Method = Methods.SetGameObjectActive

the selected method to blink the target object

◆ OffValue

float MoreMountains.Feedbacks.MMBlink.OffValue = 0f

the value to apply when blinking is off

◆ OnValue

float MoreMountains.Feedbacks.MMBlink.OnValue = 1f

the value to apply when blinking is on

◆ Phases

List<BlinkPhase> MoreMountains.Feedbacks.MMBlink.Phases

The list of phases to apply blinking with.

◆ RepeatCount

int MoreMountains.Feedbacks.MMBlink.RepeatCount = 0

how many times the sequence should repeat (-1 : infinite)

◆ ShaderPropertyName

string MoreMountains.Feedbacks.MMBlink.ShaderPropertyName = "_Color"

the shader property to alter a float on

◆ StartBlinkingButton

bool MoreMountains.Feedbacks.MMBlink.StartBlinkingButton

Test button.

◆ StateOnExit

States MoreMountains.Feedbacks.MMBlink.StateOnExit = States.On

the state to apply on exit

◆ StopBlinkingButton

bool MoreMountains.Feedbacks.MMBlink.StopBlinkingButton

Test button.

◆ TargetGameObject

GameObject MoreMountains.Feedbacks.MMBlink.TargetGameObject

the object to set active/inactive if that method was chosen

◆ TargetRenderer

Renderer MoreMountains.Feedbacks.MMBlink.TargetRenderer

the target renderer to work with

◆ TimescaleMode

TimescaleModes MoreMountains.Feedbacks.MMBlink.TimescaleMode = TimescaleModes.Scaled

whether or not this MMBlink should operate on unscaled time

◆ ToggleBlinkingButton

bool MoreMountains.Feedbacks.MMBlink.ToggleBlinkingButton

Test button.

◆ UseMaterialPropertyBlocks

bool MoreMountains.Feedbacks.MMBlink.UseMaterialPropertyBlocks = false

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


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