|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||

java.lang.Objectcz.cuni.amis.utils.Heatup
public class Heatup
This class allows you to easily setup heatup for any effect you need. I.e., something happens and you need to pursue
some behavior/effect for amount of time. Just create heatup with specified amount of time
"for the heat" and use isHot() to check whether you should still be using your behavior/effect.
To make your heatup hot, just call heat().
| Constructor Summary | |
|---|---|
Heatup(long cooldownMillis)
|
|
Heatup(long cooldownTime,
TimeUnit timeUnit)
|
|
| Method Summary | |
|---|---|
void |
clear()
Removes the heat... |
long |
getRemainingTime()
How much time we still have until the object becomes cold, i.e., ! isHot(). |
void |
heat()
Force use of the effect == sets lastUsedMillis to current time. |
boolean |
isCool()
Check whether we're cool == ! isHot(). |
boolean |
isHot()
Check whether it is still hot. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Heatup(long cooldownMillis)
public Heatup(long cooldownTime,
TimeUnit timeUnit)
| Method Detail |
|---|
public boolean isHot()
public void heat()
lastUsedMillis to current time.
public long getRemainingTime()
isHot().
public void clear()
public boolean isCool()
isHot().
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||