public static void Draw() { #if WINDOWS if (NeedSizeChange) { NeedSizeChange = false; Game1.graphics.PreferredBackBufferWidth = TargetSizeX; Game1.graphics.PreferredBackBufferHeight = TargetSizeY; GameManager.SetSize(new Vector2(TargetSizeX, TargetSizeY)); return; } #endif #if EDITOR #if WINDOWS if (MasterManager.FullScreenViewport.Width != Game1.self.Window.ClientBounds.Width || MasterManager.FullScreenViewport.Height != Game1.self.Window.ClientBounds.Height) { MasterManager.FullScreenSize = new Vector2(Game1.self.Window.ClientBounds.Width, Game1.self.Window.ClientBounds.Height); MasterManager.FullScreenViewport = new Viewport(0, 0, Game1.self.Window.ClientBounds.Width, Game1.self.Window.ClientBounds.Height); MasterManager.ProfileMessageRect.X = Game1.self.Window.ClientBounds.Width - 150; } EditorManager.Draw(); #endif #if XBOX RecieverManager.Draw(); #endif #endif #if !EDITOR GameManager.Draw(); #endif }
public static void Update(GameTime gameTime) { #if WINDOWS if (Game1.self.IsActive) { MouseManager.Update(gameTime); KeyboardManager.Update(gameTime); } #endif bool Loading = Level.LoadLevels(); #if EDITOR #if !XBOX EditorManager.Update(gameTime); #endif #if XBOX RecieverManager.Update(gameTime); #endif #endif #if !EDITOR GameManager.Update(gameTime); #endif }