예제 #1
0
 public void removeOrUsePotion(Item Potion)
 {
     if (Potion is PotionLife)
     {
         PotionLife p = Potion as PotionLife;
         inventoryPotionLife.Remove(p);
     }
     else if (Potion is PotionMana)
     {
         PotionMana p = Potion as PotionMana;
         inventoryPotionMana.Remove(p);
     }
 }
예제 #2
0
 public Boolean AddPotion(Item Potion)
 {
     if (Potion is PotionLife)
     {
         PotionLife p = Potion as PotionLife;
         inventoryPotionLife.Add(p);
         return(true);
     }
     else if (Potion is PotionMana)
     {
         PotionMana p = Potion as PotionMana;
         inventoryPotionMana.Add(p);
         return(true);
     }
     return(false);
 }