public void ObtainPotion(int _slot, AbstractPotion _potion) { if (_slot < PotionSlots) { Potions.Insert(_slot, _potion); _potion.SetAsObtained(_slot); } }
public bool IsObtainPotion(AbstractPotion _potion2Obtain) { int tIndex = 0; for (int i = 0; i < Potions.Count; i++) { if (Potions[i] is PotionSlot) { break; } } if (tIndex < PotionSlots) { Potions.Insert(tIndex, _potion2Obtain); _potion2Obtain.SetAsObtained(tIndex); //_potion2Obtain. return(true); } //AbstractDungeon.top return(false); }
public ObtainPotionAction(AbstractPotion _potion) { GameActionType = ActionType.Special; potion = _potion; }