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; }
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); }
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); } } }
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); } } }
public override void Buy(TypeOfBottles bottle, IShip ship, IPlayer player) { }
abstract public void Buy(TypeOfBottles bottle, IShip ship, IPlayer player);
abstract public IBottle GetProduct(TypeOfBottles bottle);
abstract public IBottle GetBottle(TypeOfBottles type);
abstract public IBottle GetBottle (TypeOfBottles type);
override public IBottle GetProduct(TypeOfBottles bottle) { return bottleMaker.GetBottle(bottle); }
override public IBottle GetProduct(TypeOfBottles bottle) { return(bottleMaker.GetBottle(bottle)); }