Beispiel #1
0
 /// <summary>
 /// Requests a screen with the given ID and open or close action
 /// </summary>
 /// <param name="screenID">The requested screen ID.</param>
 /// <param name="open">If true open the screen, otherwise close it.</param>
 public void RequestScreen(string screenID, bool open)
 {
     if (panelLayer.HasScreen(screenID))
     {
         if (open)
         {
             panelLayer.ShowScreen(screenID);
         }
         else
         {
             panelLayer.HideScreen(screenID);
         }
     }
     else if (dialogLayer.HasScreen(screenID))
     {
         if (open)
         {
             dialogLayer.ShowScreen(screenID);
         }
         else
         {
             dialogLayer.HideScreen(screenID);
         }
     }
     else
     {
         Debug.LogError(screenID + " not found on any layer.");
     }
 }