Exemple #1
0
        public override void HandleInput(InputState input)
        {
            foreach (GestureSample gesture in input.Gestures)
            {
                if (gesture.GestureType == GestureType.Tap)
                {
                    if (gesture.Position.X > 0 &&
                        gesture.Position.Y > 0 &&
                        gesture.Position.X < width &&
                        gesture.Position.Y < height)
                    {
                        switch (_statut_tuto)
                        {
                        case Statut_Annimation_Page.Page_1:
                            time         = new Compteur_Time(2000f);
                            _statut_tuto = Statut_Annimation_Page.Page_2;
                            _phase_anim  = Phase_Annimation.Phase_1;
                            plateau.Changement_Statut_Case_To_Selected(0);
                            plateau.Changement_Statut_Selected_To_Validation(1, 0, CaseClass.Type_Case.Red);
                            break;

                        case Statut_Annimation_Page.Page_2:
                            _statut_tuto = Statut_Annimation_Page.Page_3;
                            _phase_anim  = Phase_Annimation.Phase_1;
                            plateau.Reset_Plateau("333333333333333300000000444444444444444444444444");
                            plateau.Changement_Statut_Case_To_Selected(11);
                            plateau.Changement_Statut_Selected_To_Validation(19, 11, CaseClass.Type_Case.Red);
                            break;

                        case Statut_Annimation_Page.Page_3:
                            _statut_tuto = Statut_Annimation_Page.Page_4;
                            _phase_anim  = Phase_Annimation.Phase_1;
                            break;

                        case Statut_Annimation_Page.Page_4:
                            this.ExitScreen();
                            ScreenManager.AddScreen(new MainMenuScreen());
                            break;

                        default:
                            this.ExitScreen();
                            ScreenManager.AddScreen(new MainMenuScreen());
                            break;
                        }
                    }
                }
            }
            base.HandleInput(input);
        }
Exemple #2
0
        public override void Update(GameTime gameTime, bool otherScreenHasFocus, bool coveredByOtherScreen)
        {
            float timer = (float)gameTime.ElapsedGameTime.TotalMilliseconds;

            plateau.Update_Annimation(timer, PlayClass.Couleurs.Red);

            if (_statut_tuto == Statut_Annimation_Page.Page_1)
            {
                if (_phase_anim == Phase_Annimation.Phase_1)
                {
                    if (time.IncreaseTimer(timer))
                    {
                        plateau.Changement_Statut_Case_To_Selected(0);
                        _phase_anim = Phase_Annimation.Phase_2;
                    }
                }
                else if (_phase_anim == Phase_Annimation.Phase_2)
                {
                    if (time.IncreaseTimer(timer))
                    {
                        plateau.Changement_Statut_Selected_To_Nothing();
                        _phase_anim = Phase_Annimation.Phase_1;
                    }
                }
            }
            else if (_statut_tuto == Statut_Annimation_Page.Page_2)
            {
                if (_phase_anim == Phase_Annimation.Phase_1)
                {
                    if (time.IncreaseTimer(timer))
                    {
                        plateau.Reset_Plateau();
                        plateau.Changement_Statut_Case_To_Selected(0);
                        _phase_anim = Phase_Annimation.Phase_2;
                        plateau.Changement_Statut_Selected_To_Validation(2, 0, CaseClass.Type_Case.Red);
                    }
                }
                else if (_phase_anim == Phase_Annimation.Phase_2)
                {
                    if (time.IncreaseTimer(timer))
                    {
                        plateau.Reset_Plateau();
                        plateau.Changement_Statut_Case_To_Selected(0);
                        _phase_anim = Phase_Annimation.Phase_1;
                        plateau.Changement_Statut_Selected_To_Validation(1, 0, CaseClass.Type_Case.Red);
                    }
                }
            }
            else if (_statut_tuto == Statut_Annimation_Page.Page_3)
            {
                if (time.IncreaseTimer(timer))
                {
                    plateau.Reset_Plateau("333333333333333300000000444444444444444444444444");
                    plateau.Changement_Statut_Case_To_Selected(11);
                    plateau.Changement_Statut_Selected_To_Validation(19, 11, CaseClass.Type_Case.Red);
                }
            }


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