Constructor and Description |
---|
Tick()
Create a tick.
|
Modifier and Type | Method and Description |
---|---|
void |
addAction(TickAction action,
int tickDelay)
Add an action to execute once tick delay elapsed.
|
int |
elapsed()
Get number of ticks elapsed since start call.
|
boolean |
elapsed(int tick)
Check if specific ticks has been elapsed.
|
boolean |
elapsedTime(Context context,
long milli)
Check if specific time has been elapsed (in tick referential).
|
boolean |
isStarted()
Check if tick started.
|
void |
pause()
Pause tick.
|
void |
restart()
Stop and start the tick.
|
void |
set(int value)
Set the tick value.
|
void |
start()
Start tick.
|
void |
stop()
Stop and reset tick.
|
void |
unpause()
Continue tick from last pause.
|
void |
update(double extrp)
Update the element.
|
public void addAction(TickAction action, int tickDelay)
action
- The action to execute.tickDelay
- The tick delay used as trigger.public void start()
public void stop()
public void restart()
public void pause()
public void unpause()
public boolean elapsed(int tick)
tick
- The ticks to check.true
if ticks elapsed, false
else.public boolean elapsedTime(Context context, long milli)
context
- The context reference.milli
- The milliseconds to check (based on frame time).true
if time elapsed, false
else.public int elapsed()
public void set(int value)
value
- The tick to set.public boolean isStarted()
true
if started, false
else.Copyright © 2017 Byron 3D Games Studio. All rights reserved.