|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.b3dgs.lionengine.game.Alterable
public class Alterable
Represents a value which can change between 0 and a maximum. It is mainly used in complement with Attributes, to represent life, mana...
AbstractAttributes
Constructor Summary | |
---|---|
Alterable(int max)
Create a new alterable. |
Method Summary | |
---|---|
void |
decrease(int dec)
Decrease current value. |
void |
fill()
Fill until max value (set current value to max). |
int |
getCurrent()
Get current value. |
int |
getMax()
Get maximum reachable value. |
int |
getPercent()
Get percent value (depending of current/max). |
void |
increase(int inc)
Increase current value. |
void |
set(int value)
Set current value. |
void |
setMax(int max)
Set maximum reachable value. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Alterable(int max)
max
- maximum reachable value.Method Detail |
---|
public void increase(int inc)
inc
- increase step.public void decrease(int dec)
dec
- decrease step.public void set(int value)
value
- current value.public void setMax(int max)
max
- maximum reachable value.public void fill()
public int getMax()
public int getCurrent()
public int getPercent()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |