View Single Post
  #7  
Old 07-16-2010, 09:24 PM
xAndrewx xAndrewx is offline
Registered User
xAndrewx's Avatar
Join Date: Sep 2004
Posts: 5,260
xAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud of
Quote:
Originally Posted by cbk1994 View Post
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(0min(this.fullheartshearts));
  
this.ap oldAP;

then you don't have to worry about it
still doesn't work :[
__________________
Reply With Quote