コード例 #1
0
 void Jouer8(object sender, EventArgs e)
 {
     foreach (GameScreen screen in ScreenManager.GetScreens())
     {
         screen.ExitScreen();
     }
     TransitionScreen.Load(ScreenManager, this, true, PlayerIndex.One, new Element_mode(8));
     song = new Song_Management(this.ScreenManager);
     song.Change_Ingame();
 }
コード例 #2
0
ファイル: Motus.cs プロジェクト: Paulalex85/Motux
        public override void Update(Microsoft.Xna.Framework.GameTime gameTime, bool otherScreenHasFocus, bool coveredByOtherScreen)
        {
            if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed)
            {
                TransitionScreen.Load(ScreenManager, this, true, PlayerIndex.One, new MainMenuScreen());
            }

            if (_nouvelle_partie)
            {
                NouvellePartie();
            }

            timer = (float)gameTime.ElapsedGameTime.TotalMilliseconds;

            transition.UpdateAlpha(timer);

            UpdateClavier();
            KeyboardAdd();

            if (_transition_keyboard)
            {
                TransitionPerduGagner(timer);
            }

            if (_validation_mot)
            {
                ValiderVerificationLettre(liste_mot.ElementAt(_position_verification_mot), timer);
            }
            if (_mot_faux)
            {
                MotInvalide_PasserSuivant();
            }
            if (_timer_attente)
            {
                PerduAffichageSolution(timer);
            }
            if (_animation_mot_juste)
            {
                AnimMotJuste(timer);
            }
            if (_type_partie == TypeDePartie.Montre && !_temps_ecoule)
            {
                Timer(timer);
            }
            if (_motfauxmontre)
            {
                TimerMontreMotFaux(timer);
            }
            if (_mot_faux_affichage_animation)
            {
                TimerAnimationMotFaux(timer);
            }

            base.Update(gameTime, otherScreenHasFocus, coveredByOtherScreen);
        }
コード例 #3
0
ファイル: Motus.cs プロジェクト: Paulalex85/Motux
        public override void HandleInput(InputState input)
        {
            foreach (GestureSample gesture in input.Gestures)
            {
                if (gesture.GestureType == GestureType.Tap)
                {
                    if (keyboard.liste_lettre[0].Alpha == 1)
                    {
                        foreach (Keyboard_Lettre caca in keyboard.liste_lettre)
                        {
                            if (caca.HandleTap(gesture.Position))
                            {
                                keyboard._letter_tapped = caca._lettre;
                                keyboard._tapped        = true;
                                keyboard._type_tapped   = caca._type;
                                break;
                            }
                        }
                    }
                    if (optionFinPartie.Alpha == 1)
                    {
                        if (_type_partie == TypeDePartie.Simple)
                        {
                            if (optionFinPartie.HandleTapMenu(gesture.Position))
                            {
                                TransitionScreen.Load(ScreenManager, this, true, PlayerIndex.One, new MainMenuScreen());
                            }

                            if (optionFinPartie.HandleTapRejouer(gesture.Position))
                            {
                                TransitionScreen.Load(ScreenManager, this, true, PlayerIndex.One, new InGame.Motus(_facile, TypeDePartie.Simple));
                            }
                        }
                        else
                        {
                            if (optionFinPartie.HandleTapScore(gesture.Position))
                            {
                                TransitionScreen.Load(ScreenManager, this, true, PlayerIndex.One, new ScoreScreen(_type_partie, _nombre_de_point));
                            }

                            if (optionFinPartie.HandleTapRejouer(gesture.Position))
                            {
                                TransitionScreen.Load(ScreenManager, this, true, PlayerIndex.One, new InGame.Motus(_facile, _type_partie));
                            }
                        }
                    }
                }
            }

            base.HandleInput(input);
        }
コード例 #4
0
        public override void Update(Microsoft.Xna.Framework.GameTime gameTime, bool otherScreenHasFocus, bool coveredByOtherScreen)
        {
            if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed)
            {
                if (visualisation)
                {
                    this.ExitScreen();
                    ScreenManager.AddScreen(new ScoreVisualisation_TypePartie());
                }
                else
                {
                    TransitionScreen.Load(ScreenManager, this, true, PlayerIndex.One, new MainMenuScreen());
                }
            }
            if (!multi.HighScoreLoaded)
            {
                _timeloading += (float)gameTime.ElapsedGameTime.TotalMilliseconds;
                Loading(_timeloading);
            }

            base.Update(gameTime, otherScreenHasFocus, coveredByOtherScreen);
        }