public static void Update(GameTime gameTime)
 {
     if (GameManager.GetLevel() == null)
     {
         if (PlayerProfile.getController(0) == null)
         {
             PlayerProfile.Update(gameTime, true);
             if (PlayerProfile.getController(0) != null)
             {
                 setMessage("Press A to search for connection");
             }
         }
         else
         {
             PlayerProfile.Update(gameTime, false);
             if (NetworkManager.networkSession == null)
             {
                 BasicController b = PlayerProfile.getController(0);
                 if (b.AButton())
                 {
                     setMessage("Attempting to Join...");
                     if (NetworkManager.JoinSession())
                     {
                         setMessage("Sucess");
                     }
                     else
                     {
                         setMessage("Failure to Connect");
                     }
                 }
             }
             else
             {
                 NetworkManager.Update(gameTime);
             }
         }
     }
     else
     {
         if (!PlayerProfile.getController(0).BackButton())
         {
             GameManager.Update(gameTime);
             FPSCounter.Update(gameTime);
         }
         else
         {
             GameManager.ClearLevel();
         }
     }
 }
        public void Update(GameTime gameTime)
        {
            UpdateTime(gameTime);

            if (Loading)
            {
                LoadingProgressBarAlpha += gameTime.ElapsedGameTime.Milliseconds * 60 / 100000f;
                if (LoadingProgressBarAlpha > 1)
                {
                    LoadingProgressBarAlpha = 1;
                }
                return;
            }
            if (LoadingProgressBarAlpha > 0)
            {
                LoadingProgressBarAlpha -= gameTime.ElapsedGameTime.Milliseconds * 60 / 100000f;
                if (LoadingProgressBarAlpha < 0)
                {
                    LoadingProgressBarAlpha = 0;
                }
            }

            if (MyScene != null)
            {
#if EDITOR && WINDOWS
                if (LevelForEditing)
                {
                    MyScene.UpdateEditor(gameTime);
                }
                else if (true)
#endif
                MyScene.Update(gameTime);

                if (MyScene.NeedsPlayers)
                {
                    PlayerProfile.CallLevelEvents();
                    MyScene.NeedsPlayers = false;
                }
            }

            PlayerProfile.Update(gameTime, AllowJoining);
        }