public void Toggle(GuiScreenType type) { if (!Open(type)) { //Screen was already open so close it Close(type); } }
public void Close(GuiScreenType type) { tabs.SetActive(false); activeScreen.Close(); if (activeScreen == shop) { inventory.Close(); } activeScreen = null; playerAttack.enabled = true; playerMovement.enabled = true; playerRigidBody.simulated = true; }
GuiScreen GetScreen(GuiScreenType type) { switch (type) { case GuiScreenType.Inventory: return(inventory); case GuiScreenType.Stats: return(stats); case GuiScreenType.Shop: return(shop); case GuiScreenType.Journal: return(journal); case GuiScreenType.Map: return(map); default: throw new NotImplementedException(); } }
public bool Open(GuiScreenType type) { return(Open(GetScreen(type))); }
public bool IsOpen(GuiScreenType type) { return(activeScreen == GetScreen(type)); }