public static void Test() { var human = new Human(); //アイテム取得 human.AddItem(new KaifukuItem());//回復 human.AddItem(new KougekiItem());//攻撃 human.AddItem(new BougyoItem()); //防御 //使う human.UseItem(0);//回復薬を使う human.UseItem(0);//攻撃薬を使う human.UseItem(0);//防御薬を使う }
public abstract void Apply(Human human);
public override void Apply(Human human) { human.Bougyo += 100; }
public override void Apply(Human human) { human.Kougeki += 100; }
public override void Apply(Human human) { human.Life += 100; }