public PuzzleGame() { Content.RootDirectory = "Content"; graphics = new GraphicsDeviceManager(this); //#if WINDOWS_PHONE // graphics.IsFullScreen = true; //#endif TargetElapsedTime = TimeSpan.FromTicks(333333); //InitializePortraitGraphics(); //InitializeLandscapeGraphics(); screenManager = new ScreenManager(this); Components.Add(screenManager); #if WINDOWS_PHONE if (!screenManager.DeserializeState()) { screenManager.AddScreen(GameScreenFactory.Create <BackgroundScreen>(), null); screenManager.AddScreen(GameScreenFactory.Create <MainMenuScreen>(), null); } #else screenManager.AddScreen(GameScreenFactory.Create <BackgroundScreen>(), null); screenManager.AddScreen(GameScreenFactory.Create <MainMenuScreen>(), null); #endif }
public override void HandleInput(InputState input) { PlayerIndex player; if (input.IsNewButtonPress(Buttons.Back, ControllingPlayer, out player) || input.IsNewKeyPress(Keys.Escape, ControllingPlayer, out player)) { switch (Mode) { case GameplayDrawMode.Puzzle: LoadingScreen.Load(ScreenManager, false, ControllingPlayer, previewScreen, gameOptionsScreen); break; case GameplayDrawMode.Congratulations: LoadingScreen.Load(ScreenManager, true, ControllingPlayer, GameScreenFactory.Create <BackgroundScreen>(), GameScreenFactory.Create <MainMenuScreen>()); break; default: break; } } }
void AboutMenuEntrySelected(object sender, PlayerIndexEventArgs e) { ScreenManager.AddScreen(GameScreenFactory.Create <CreditsScreen>(), e.PlayerIndex); }
void PlayGameMenuEntrySelected(object sender, PlayerIndexEventArgs e) { LoadingScreen.Load(ScreenManager, true, e.PlayerIndex, GameScreenFactory.Create <GameplayScreen>()); }
void OptionsSelected(object sender, PlayerIndexEventArgs e) { LoadingScreen.Load(ScreenManager, true, e.PlayerIndex, GameScreenFactory.Create <BackgroundScreen>(), GameScreenFactory.Create <OptionsMenuScreen>()); }
protected override void OnCancel(PlayerIndex playerIndex) { LoadingScreen.Load(ScreenManager, true, playerIndex, GameScreenFactory.Create <BackgroundScreen>(), GameScreenFactory.Create <MainMenuScreen>()); }
public InGameOptionsScreen() : this(GameScreenFactory.Create <GameplayScreen>()) { }
public PreviewScreen() : this(GameScreenFactory.Create <GameplayScreen>()) { }