Exemplo n.º 1
0
        public override IBottle GetBottle(TypeOfBottles type)
        {
            IBottle bottle = null;
          
                if (type == TypeOfBottles.LiteHealing)
                {
                    bottle = new LiteHealingBottle();
                }
                else if (type == TypeOfBottles.RealHealing)
                {
                    bottle = new RealHealingBottle();
                }
                else
                {
                    bottle = new BerserkBottle();
                }

          return bottle; 
        }
Exemplo n.º 2
0
        public override IBottle GetBottle(TypeOfBottles type)
        {
            IBottle bottle = null;

            if (type == TypeOfBottles.LiteHealing)
            {
                bottle = new LiteHealingBottle();
            }
            else if (type == TypeOfBottles.RealHealing)
            {
                bottle = new RealHealingBottle();
            }
            else
            {
                bottle = new BerserkBottle();
            }

            return(bottle);
        }
Exemplo n.º 3
0
 public void UseBottle(TypeOfBottles bottle, int index)
 {
     if (bottle == TypeOfBottles.LiteHealing || bottle == TypeOfBottles.RealHealing)
     {
         HP += bottles[index].PowegOfPotion;
         if (HP > maxHPCount)
         {
             HP = maxHPCount;
         }
         if (bottles[index].BottleType == TypeOfBottles.LiteHealing || bottles[index].BottleType == TypeOfBottles.RealHealing)
         {
             bottles.RemoveAt(index);
         }
     }
     else if (bottle == TypeOfBottles.MadBerserker)
     {
         durBottleController.Add(bottles[index]);
         if (bottles[index].BottleType == TypeOfBottles.MadBerserker)
         {
             bottles.RemoveAt(index);
         }
     }
 }
Exemplo n.º 4
0
 public   void UseBottle(TypeOfBottles bottle, int index)
   {
      if ( bottle == TypeOfBottles.LiteHealing || bottle == TypeOfBottles.RealHealing )
       {
           HP += bottles[index].PowegOfPotion;
           if (HP > maxHPCount)
           {
               HP = maxHPCount;
           }
           if (bottles[index].BottleType == TypeOfBottles.LiteHealing || bottles[index].BottleType == TypeOfBottles.RealHealing)
           {
               bottles.RemoveAt(index);
           }
       }
       else if (bottle == TypeOfBottles.MadBerserker)
       {
           durBottleController.Add(bottles[index]);
           if (bottles[index].BottleType == TypeOfBottles.MadBerserker)
           {
               bottles.RemoveAt(index);
           }
       }
      
   }
Exemplo n.º 5
0
 public override void Buy(TypeOfBottles bottle, IShip ship, IPlayer player)
 {
 }
Exemplo n.º 6
0
 abstract public void Buy(TypeOfBottles bottle, IShip ship, IPlayer player);
Exemplo n.º 7
0
 abstract public IBottle GetProduct(TypeOfBottles bottle);
Exemplo n.º 8
0
 abstract public IBottle GetBottle(TypeOfBottles type);
Exemplo n.º 9
0
        public override void Buy(TypeOfBottles bottle, IShip ship, IPlayer player)
        {

        }
Exemplo n.º 10
0
 abstract public void Buy(TypeOfBottles bottle, IShip ship, IPlayer player);
Exemplo n.º 11
0
 abstract public IBottle GetBottle (TypeOfBottles type);
Exemplo n.º 12
0
 override public IBottle GetProduct(TypeOfBottles bottle)
 {
     return bottleMaker.GetBottle(bottle);
 }
Exemplo n.º 13
0
 override public IBottle GetProduct(TypeOfBottles bottle)
 {
     return(bottleMaker.GetBottle(bottle));
 }
Exemplo n.º 14
0
 abstract public IBottle GetProduct(TypeOfBottles bottle);