package game.persona_01;
/*
游戏的角色
COR
alt + shift + s + c 无参
o 有参
r get /set
*/
public class User {
//成员变量
private String name;
private int level;
private int hp; // 血值
private int mp; // 法力
private long exp; //经验
public User() {
super();
}
public User(String name, int level, int hp, int mp, long exp) {
super();
this.name = name;
this.level = level;
this.hp = hp;
this.mp = mp;
this.exp = exp;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public int getLevel() {
return level;
}
public void setLevel(int level) {
this.level = level;
}
public int getHp() {
return hp;
}
public void setHp(int hp) {
this.hp = hp;
}
public int getMp() {
return mp;
}
public void setMp(int mp) {
this.mp = mp;
}
public long getExp() {
return exp;
}
public void setExp(long exp) {
this.exp = exp;
}
}
package game.persona_01;
/*
*/
public class VipUser extends User {
public VipUser() {
super();
// TODO Auto-generated constructor stub
}
public VipUser(String name, int level, int hp, int mp, long exp) {
super(name, level, hp, mp, exp);
// TODO Auto-generated constructor stub
}
}
|
|