platformer
Public Member Functions | Public Attributes | Protected Attributes | List of all members
UnityPlatformer.Cooldown Class Reference

Cooldown helper More...

Inheritance diagram for UnityPlatformer.Cooldown:
UnityPlatformer.IUpdateEntity

Public Member Functions

 Cooldown (float timeInSeconds)
 constructor More...
 
bool Ready ()
 Is ready? cooldown expired? More...
 
void Set (float timeInSeconds)
 Update cooldown More...
 
void Reset ()
 Reset More...
 
void Clear ()
 Clear cooldown -> ready More...
 
void PlatformerUpdate (float delta)
 Event like FixedUpdate More...
 
void LatePlatformerUpdate (float delta)
 Event fired after every entity recieve PlatformerUpdate More...
 

Public Attributes

Action onReset
 callbacks More...
 
Action onReady
 callbacks More...
 

Protected Attributes

float counter
 time since last reset More...
 
float seconds
 cooldown time in seconds More...
 
bool wasReady = false
 boolean to keep track of when fire the callbacks More...
 

Detailed Description

Cooldown helper

Deprecated:
use Delay instead

Constructor & Destructor Documentation

◆ Cooldown()

UnityPlatformer.Cooldown.Cooldown ( float  timeInSeconds)
inline

constructor

Member Function Documentation

◆ Clear()

void UnityPlatformer.Cooldown.Clear ( )
inline

Clear cooldown -> ready

◆ LatePlatformerUpdate()

void UnityPlatformer.Cooldown.LatePlatformerUpdate ( float  delta)
inline

Event fired after every entity recieve PlatformerUpdate

Implements UnityPlatformer.IUpdateEntity.

◆ PlatformerUpdate()

void UnityPlatformer.Cooldown.PlatformerUpdate ( float  delta)
inline

Event like FixedUpdate

Implements UnityPlatformer.IUpdateEntity.

◆ Ready()

bool UnityPlatformer.Cooldown.Ready ( )
inline

Is ready? cooldown expired?

◆ Reset()

void UnityPlatformer.Cooldown.Reset ( )
inline

Reset

◆ Set()

void UnityPlatformer.Cooldown.Set ( float  timeInSeconds)
inline

Update cooldown

Member Data Documentation

◆ counter

float UnityPlatformer.Cooldown.counter
protected

time since last reset

◆ onReady

Action UnityPlatformer.Cooldown.onReady

callbacks

◆ onReset

Action UnityPlatformer.Cooldown.onReset

callbacks

◆ seconds

float UnityPlatformer.Cooldown.seconds
protected

cooldown time in seconds

◆ wasReady

bool UnityPlatformer.Cooldown.wasReady = false
protected

boolean to keep track of when fire the callbacks


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