Exemplo n.º 1
0
 //Return false if already open
 bool Open(GuiScreen screen)
 {
     if (screen != activeScreen)
     {
         if (activeScreen != null)
         {
             activeScreen.Close();
         }
         activeScreen = screen;
         activeScreen.Open();
         if (screen == shop)
         {
             tabs.SetActive(false);
             //The right part of inventory screen is used together with shop
             inventory.Open();
         }
         else
         {
             tabs.SetActive(true);
         }
         playerAttack.enabled      = false;
         playerMovement.enabled    = false;
         playerRigidBody.simulated = false;
         return(true);
     }
     return(false);
 }