private void AfterSplashScreen() { screenManager.AddScreen(new BackgroundMenuScreen()); screenManager.AddScreen(new MainMenuScreen()); song = new Song_Management(this.screenManager); song.Change_Intro(); }
public override void Update(Microsoft.Xna.Framework.GameTime gameTime, bool otherScreenHasFocus, bool coveredByOtherScreen) { if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed) { this.ExitScreen(); ScreenManager.AddScreen(new BackgroundMenuScreen()); ScreenManager.AddScreen(new MainMenuScreen()); song = new Song_Management(this.ScreenManager); song.Change_Intro(); } song.UpdateSong(); float timer = (float)gameTime.ElapsedGameTime.TotalMilliseconds; if (_initialization_done && _statut_partie == Statut_Partie.En_cours) { GestionDesEvenementsDuree(timer); Update_Liste_Carre_Par_Element(timer); objectif_ligne_carre.UpdatePosition(); Gagner_Perdu(timer); _time_montre += timer; GestionAnnimationColorInterface(timer); CarreUpdate(timer); UpdateParticule(); UpdateBackground(timer); AnnimColor(); GestionHighScore(); REPOSIOTNEMENTMESCOUILLES(); } else if (_initialization_done && _statut_partie == Statut_Partie.Initialization) { Update_Liste_Carre_Par_Element(timer); Statut_partie_initialization(timer); UpdateParticule(); } else if (_statut_partie == Statut_Partie.Pause) { pause.UpdatePause(); Statut_sortie_de_pause(); } else if (_statut_partie == Statut_Partie.Perdu) { fin_partie.Update(timer); } else if (_statut_partie == Statut_Partie.Tuto) { _tuto.UpdatePause(); Statut_sortie_de_pause(); } base.Update(gameTime, otherScreenHasFocus, coveredByOtherScreen); }
private void Quitter() { _screen.ExitScreen(); _screen.ScreenManager.AddScreen(new BackgroundMenuScreen()); _screen.ScreenManager.AddScreen(new MainMenuScreen()); song = new Song_Management(_screen.ScreenManager); song.Change_Intro(); }
public void HandleInput(InputState input) { Vector2 son_pos = new Vector2(10, 720); foreach (GestureSample gesture in input.Gestures) { if (gesture.GestureType == GestureType.Tap) { if (gesture.Position.X > position1.X && gesture.Position.X < position1.X + font.MeasureString(reprendre.ToUpper()).X&& gesture.Position.Y > position1.Y && gesture.Position.Y < position1.Y + font.MeasureString(reprendre.ToUpper()).Y) { Reprendre(); } if (gesture.Position.X > position2.X && gesture.Position.X < position2.X + font.MeasureString(quitter.ToUpper()).X&& gesture.Position.Y > position2.Y && gesture.Position.Y < position2.Y + font.MeasureString(quitter.ToUpper()).Y) { foreach (GameScreen screen in _screen.ScreenManager.GetScreens()) { screen.ExitScreen(); } _screen.ScreenManager.AddScreen(new BackgroundMenuScreen()); _screen.ScreenManager.AddScreen(new MainMenuScreen()); song = new Song_Management(_screen.ScreenManager); song.Change_Intro(); } if (gesture.Position.X > son_pos.X && gesture.Position.X < son_pos.X + 150 && gesture.Position.Y > son_pos.Y && gesture.Position.Y < son_pos.Y + 100) { song.Change_Mute(); if (music) { music = false; } else { music = true; } } } } }