public void InteractObject(InteractableWrapper interactable) { interactable.Interact(); if (CurrentGame.CurrentRoom != null) { CurrentGame.CurrentRoom.RecalculateInteractableVisibility(); } CurrentGame.RefreshAll(); MainViewModel.GetMainViewModelStatic().CurrentGame.RunActiveEvents(); }
public void SetExploreMode() { ExploreMode = true; InventoryMode = false; EquipmentMode = false; ConversationMode = false; if (CurrentGame.CurrentRoom != null) { CurrentGame.CurrentRoom.RecalculateInteractableVisibility(); } CurrentGame.RefreshAll(); MainViewModel.GetMainViewModelStatic().CurrentGame.RunActiveEvents(); }
public void UnequipItem() { if (SelectedEquippedItem != null) { var i = SelectedEquippedItem; if (CurrentGame.TryUnequipItem(SelectedEquippedItem)) { CurrentGame.PlayerInventory.Add(i); } CurrentGame.RefreshAll(); RefreshEquippableItems(); ViewEquipment(); SelectedEquippedItem = null; MainViewModel.GetMainViewModelStatic().CurrentGame.RunActiveEvents(); } }
public void EquipItem() { if (SelectedEquippableItem != null) { var unequipped = CurrentGame.TryEquipItem(SelectedEquippableItem); CurrentGame.RefreshAll(); foreach (var a in unequipped) { CurrentGame.PlayerInventory.Add(a); } RefreshEquippableItems(); ViewEquipment(); SelectedEquippableItem = null; MainViewModel.GetMainViewModelStatic().CurrentGame.RunActiveEvents(); } }