C# Class UnityPlatformer.Cooldown

Cooldown helper
Inheritance: IUpdateEntity
Datei anzeigen Open project: llafuente/unity-platformer Class Usage Examples

Public Properties

Property Type Description
onReady System.Action
onReset System.Action

Protected Properties

Property Type Description
counter float
seconds float
wasReady bool

Public Methods

Method Description
Clear ( ) : void

Clear cooldown -> ready

Cooldown ( float timeInSeconds ) : System
LatePlatformerUpdate ( float delta ) : void
PlatformerUpdate ( float delta ) : void
Ready ( ) : bool

Is ready? cooldown expired?

Reset ( ) : void

Reset

Update ( float timeInSeconds ) : void

Update cooldown

Method Details

Clear() public method

Clear cooldown -> ready
public Clear ( ) : void
return void

Cooldown() public method

public Cooldown ( float timeInSeconds ) : System
timeInSeconds float
return System

LatePlatformerUpdate() public method

public LatePlatformerUpdate ( float delta ) : void
delta float
return void

PlatformerUpdate() public method

public PlatformerUpdate ( float delta ) : void
delta float
return void

Ready() public method

Is ready? cooldown expired?
public Ready ( ) : bool
return bool

Reset() public method

Reset
public Reset ( ) : void
return void

Update() public method

Update cooldown
public Update ( float timeInSeconds ) : void
timeInSeconds float
return void

Property Details

counter protected_oe property

time since last reset
protected float counter
return float

onReady public_oe property

callbacks
public Action,System onReady
return System.Action

onReset public_oe property

callbacks
public Action,System onReset
return System.Action

seconds protected_oe property

cooldown time in seconds
protected float seconds
return float

wasReady protected_oe property

boolean to keep track of when fire the callbacks
protected bool wasReady
return bool