public override void Update(GameTime gameTime) { _timer++; base.Update(gameTime); if (_timer > 120) { if (InputHandler.ActionKeyPressed(ActionKey.ConfirmAndInteract, PlayerIndex.One)) { // Reset everything in the game GameRef.GamePlayScreen = new GamePlayScreen(GameRef, StateManager); GameRef.BattleScreen = new BattleScreen(GameRef, StateManager); var datamanager = new DataManager(GameRef); GamePlayScreen.Player.PlayerTrainer = DataManager.Trainers["Trond"]; StateManager.ChangeState(GameRef.GamePlayScreen); GameRef.IntroScreen.InitializeIntro(); _timer = 0; } else if (InputHandler.ActionKeyPressed(ActionKey.Exit, PlayerIndex.One)) Game.Exit(); } }
/// <summary> /// LoadContent will be called once per game and is the place to load /// all of your content. /// </summary> protected override void LoadContent() { SpriteBatch = new SpriteBatch(GraphicsDevice); var dataManager = new DataManager(this); GamePlayScreen.Player.PlayerTrainer = DataManager.Trainers["Trond"]; IntroScreen.InitializeIntro(); }