Ejemplo n.º 1
0
 public void Toggle(GuiScreenType type)
 {
     if (!Open(type))
     {
         //Screen was already open so close it
         Close(type);
     }
 }
Ejemplo n.º 2
0
 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;
 }
Ejemplo n.º 3
0
    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();
        }
    }
Ejemplo n.º 4
0
 public bool Open(GuiScreenType type)
 {
     return(Open(GetScreen(type)));
 }
Ejemplo n.º 5
0
 public bool IsOpen(GuiScreenType type)
 {
     return(activeScreen == GetScreen(type));
 }