Role.java :  » App » android-app-examples » org » ssg » android » game » herogame » Android Open Source

Android Open Source » App » android app examples 
android app examples » org » ssg » android » game » herogame » Role.java
package org.ssg.android.game.herogame;

import org.ssg.android.game.herogame.control.BackGroundMap;

public abstract class Role extends Sprite {


  public String roleName;
    public int hp; // 
    public int attack; // 
    public int defence;// 
    public int maxHP;
    
    public int hit;
  public int strength;
  public int element_set = 100;
  public boolean critical;
  public int dex;
  public int agi;
  public boolean guarding;
  public int damage = -1;
  
  public int HPx, HPy, frameNo = 0;
  
    public int getHit() {
    return hit;
  }

  public void setHit(int hit) {
    this.hit = hit;
  }

  public int getStrength() {
    return strength;
  }

  public void setStrength(int strength) {
    this.strength = strength;
  }
    
    public int getHp() {
        return hp;
    }

    public void setHp(int hp) {
        if (hp < 0)
            this.hp = 0;
        else
            this.hp = hp;
    }

    public int getAttack() {
        return attack;
    }

    public void setAttack(int attack) {
        this.attack = attack;
    }

    public int getDefence() {
        return defence;
    }

    public void setDefence(int defence) {
        this.defence = defence;
    }

    public int getMaxHP() {
        return maxHP;
    }

    public void setMaxHP(int maxHP) {
        this.maxHP = maxHP;
    }
    
    public Role(String fileName, int x, int y, int w, int h, Level level, int hp,
            int attack, int defence) {
        super(fileName, x, y, w, h, level);
        this.hp = hp;
        this.attack = attack;
        this.defence = defence;
        maxHP = hp;
    }

    public void resetHPxy() {
      
    }
}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.