Esempio n. 1
0
        private void ExecuteDeleteConsumable(object parameter)
        {
            IMessageBoxService msg = new MessageBoxService();

            if (parameter != null)
            {
                if (msg.ShowMessage("Are you sure you want to delete this consumable item?", "Deleting Consumable Record", GenericMessageBoxButton.YesNo, GenericMessageBoxIcon.Question).Equals(GenericMessageBoxResult.Yes))
                {
                    Consumables.Remove((AssetModel)parameter);
                    DeleteItem(((AssetModel)parameter).ID, "Assets");
                }
            }
            msg = null;
        }
Esempio n. 2
0
 public void UseConsumable(Consumable consumable)
 {
     // if error here somehow player chose consumable that doesnt exist
     Consumables.Remove(consumable);
     this.Heal(consumable.Use());
 }