public void UpdateInventoryCategories() { MediPack.Clear(); Weapons.Clear(); Currency.Clear(); Clue.Clear(); foreach (var gameItem in _inventory) { if (gameItem is Potion) { MediPack.Add(gameItem); } if (gameItem is Weapon) { Weapons.Add(gameItem); } if (gameItem is Coin) { Currency.Add(gameItem); } if (gameItem is Clues) { Clue.Add(gameItem); } } }
private void ProcessMediPackUse(MediPack mediPack) { _player.Health += mediPack.HealthChange; _player.Lives += mediPack.LivesChange; _player.RemoveGameItemFromInventory(_currentGameItem); }