Exemple #1
0
 private static void DrawMenuButton(int state, Rect r, Texture2D normal, Texture2D hover)
 {
     Profile.mpos = new Vector2(Input.mousePosition.x, (float)Screen.height - Input.mousePosition.y);
     if (r.Contains(Profile.mpos))
     {
         GUI.DrawTexture(r, hover);
     }
     else
     {
         GUI.DrawTexture(r, normal);
     }
     if (GUIM.HideButton(r))
     {
         Main.HideAll();
         if (state == 0)
         {
             MenuPlayer.SetActive(true);
         }
         if (state == 1)
         {
             MenuInventory.SetActive(true);
         }
         if (state == 2)
         {
             MenuGold.SetActive(true);
         }
     }
 }
Exemple #2
0
 public static void HideAll()
 {
     MenuPlayer.SetActive(false);
     MenuGold.SetActive(false);
     MenuServers.SetActive(false);
     MenuShop.SetActive(false);
     MenuOptions.SetActive(false);
     MenuInventory.SetActive(false);
     MenuPreview.SetActive(false);
 }