|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.ObjectActor
HealthBar
public class HealthBar
Show (approximately) how much health the corresponding player has. Actually, just show one out of 100 different health bar graphics based on two variables.
| Field Summary | |
|---|---|
protected int |
health
Current health. |
protected int |
max_health
|
protected int |
side
|
| Constructor Summary | |
|---|---|
HealthBar()
|
|
| Method Summary | |
|---|---|
protected void |
draw()
Set the health bar's sprite to the image that corresponds to the current quotient health/max_health. |
void |
setHealth(int newHealth)
|
void |
setMaxHealth(int new_max_health)
|
void |
setSide(int newSide)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected int health
protected int max_health
protected int side
| Constructor Detail |
|---|
public HealthBar()
| Method Detail |
|---|
public void setHealth(int newHealth)
public void setSide(int newSide)
public void setMaxHealth(int new_max_health)
protected void draw()
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||