added asfalt

This commit is contained in:
Ziver Koc 2007-05-07 13:03:05 +00:00
parent 586b70a9ba
commit b5ab445967
6 changed files with 20 additions and 3 deletions

View file

@ -66,6 +66,8 @@ public class ProgressBar{
* @param v The value of the health bar
*/
public void setValue(int v){
if(v < 0)v = 0;
if(v > max)v = max;
value.setSize(new Vector2f(((float)v/max)*width,height));//(v/max)*width
value.setLocation(new Vector2f(-width/2+(((float)v/max)*width)/2,0));

View file

@ -13,10 +13,14 @@ public abstract class GameState {
private Camera cam;
public GameState(String name){
this(name, new Camera());
}
public GameState(String name, Camera c){
this.name = name;
input = new InputHandler();
init = false;
cam = new Camera();
cam = c;
}
/**