31 lines
496 B
Java
31 lines
496 B
Java
package com.inmind.test05;
|
|
|
|
//武器类
|
|
public class Weapon {
|
|
//名称
|
|
private String name;
|
|
//伤害值
|
|
private int hurt;
|
|
|
|
public Weapon(String name, int hurt) {
|
|
this.name = name;
|
|
this.hurt = hurt;
|
|
}
|
|
|
|
public String getName() {
|
|
return name;
|
|
}
|
|
|
|
public void setName(String name) {
|
|
this.name = name;
|
|
}
|
|
|
|
public int getHurt() {
|
|
return hurt;
|
|
}
|
|
|
|
public void setHurt(int hurt) {
|
|
this.hurt = hurt;
|
|
}
|
|
}
|