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();
         }
     }
 }
示例#2
0
        public static void Draw()
        {
            if (EditorMode)
            {
                MyEditor.Draw();
            }
            else
            {
                GameManager.Draw();

                MasterManager.SetViewportToFullscreen();
                Game1.graphicsDevice.SetRenderTarget(null);
                FPSCounter.Draw();
            }
        }
 public static void Draw()
 {
     if (GameManager.GetLevel() == null)
     {
         Game1.graphicsDevice.Clear(Color.DarkBlue);
         Game1.spriteBatch.Begin();
         Render.DrawShadowedText(RecieverMessage, new Vector2(128));
         Render.DrawShadowedText("Network Status:\n" + NetworkManager.NetworkStatus, new Vector2(128, 256));
         Game1.spriteBatch.End();
     }
     else
     {
         GameManager.Draw();
         FPSCounter.Draw();
     }
 }
示例#4
0
        public static void Update(GameTime gameTime)
        {
            if (EditorMode)
            {
                if (Game1.self.IsActive)
                {
                    MyEditor.Update(gameTime);
                }

                SenderManager.Update(gameTime);
            }
            else
            {
                if (KeyboardManager.keyboardState.IsKeyDown(Keys.Escape))
                {
                    SwitchFromPlay();
                }
                else
                {
                    GameManager.Update(gameTime);
                    FPSCounter.Update(gameTime);
                }
            }
        }