
07-16-2010, 09:24 PM
|
|
Registered User
|
 |
Join Date: Sep 2004
Posts: 5,260
|
|
Quote:
Originally Posted by cbk1994
Just set up some functions in the player class....
PHP Code:
public function heal(hearts) {
this.setHealth(this.getHearts() + hearts);
}
public function hurt(hearts) {
this.setHealth(this.getHearts() - hearts);
}
public function getHearts() {
return this.hearts;
}
public function setHealth(hearts) {
this.oldAP = this.ap;
this.ap = 50;
this.hearts = max(0, min(this.fullhearts, hearts));
this.ap = oldAP;
}
then you don't have to worry about it
|
still doesn't work :[ |
|
|
|