Class HealthBar

java.lang.Object
  extended by Actor
      extended by HealthBar

public class HealthBar
extends Actor

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

health

protected int health
Current health.


max_health

protected int max_health

side

protected int side
Constructor Detail

HealthBar

public HealthBar()
Method Detail

setHealth

public void setHealth(int newHealth)

setSide

public void setSide(int newSide)

setMaxHealth

public void setMaxHealth(int new_max_health)

draw

protected void draw()
Set the health bar's sprite to the image that corresponds to the current quotient health/max_health.