protected override void Initialize() { // TODO: Add your initialization logic here CurrentScreen = new EditorScreen(this, Graphics); base.Initialize(); }
protected override void Update(GameTime gameTime) { if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed || Keyboard.GetState().IsKeyDown(Keys.Escape)) { Exit(); } if (GamePad.GetState(PlayerIndex.One).Buttons.Start == ButtonState.Pressed || Keyboard.GetState().IsKeyDown(Keys.F5)) { CurrentScreen = new GamePlayScreen(this, Graphics); CurrentScreen.Start(); } CurrentScreen.Update(gameTime); // TODO: Add your update logic here base.Update(gameTime); }
public LoadingScreen(Screen ToLoad) { this.ToLoad = ToLoad; ToLoad.Initialize(); LoadingThread = new Thread(new ThreadStart(ToLoad.LoadContent)); }
public static void RemoveScreen(Screen Screen) { if (Screen.ContentLoaded) Screen.UnloadContent(); Screens.Remove(Screen); }
public static void AddScreen(Screen Screen) { Screens.Add(Screen); if (!Screen.ContentLoaded) Screen.Initialize(); if (!Screen.ContentLoaded) Screen.LoadContent(); }