Allowed fractional health deductions per frame

- Fixed boundary penalty system

#story[1291]
This commit is contained in:
Connor Taylor-Brown
2017-09-20 14:18:39 +12:00
parent 50d5dd02a2
commit 7eb59cdcfc
3 changed files with 7 additions and 7 deletions
@@ -106,7 +106,7 @@ public class Boat extends Collider {
/**
* Amount of health boat currently has, between 0 and 100
*/
private int health;
private double health;
/**
* Constructs a boat object with a given sourceID, name, country/team abbreviation, and polars table.
@@ -441,11 +441,11 @@ public class Boat extends Collider {
isColliding = colliding;
}
public int getHealth() {
public double getHealth() {
return health;
}
public void setHealth(int health) {
public void setHealth(double health) {
this.health = health;
}
@@ -453,7 +453,7 @@ public class Boat extends Collider {
* Add a given amount of HP to boat health
* @param delta amount of HP to add
*/
public void updateHealth(int delta) {
public void updateHealth(double delta) {
health += delta;
if(health < 0) health = 0;
else if(health > 100) health = 100;