Exemple #1
0
        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);//防御薬を使う
        }
Exemple #2
0
 public abstract void Apply(Human human);
Exemple #3
0
 public override void Apply(Human human)
 {
     human.Bougyo += 100;
 }
Exemple #4
0
 public override void Apply(Human human)
 {
     human.Kougeki += 100;
 }
Exemple #5
0
 public override void Apply(Human human)
 {
     human.Life += 100;
 }