Ejemplo n.º 1
0
 void TestConnectionManette()
 {
     Déconnection = false;
     for (int i = 0; i < NbManetteMax; i++)
     {
         if (ManetteActive[i] &&
             !GestionManette.EstManetteActivée(NumJoueur))
         {
             Déconnection = true;
         }
     }
 }
Ejemplo n.º 2
0
        void GestionDesManette()
        {
            nouvelleTouche = GamePad.GetState(NumJoueur);
            if (GestionManette.EstManetteActivée(NumJoueur))
            {
                GérerDéplacement();
                GérerAction();


                AncienneTouche = nouvelleTouche;
            }
        }
        void GestionDesManette(PlayerIndex numJoueur)
        {
            GamePadState nouvelleTouche = GamePad.GetState(numJoueur);

            // Process input only if connected.
            if (GestionManette.EstManetteActivée(numJoueur))
            {
                // Increase vibration if the player is tapping the A button.
                // Subtract vibration otherwise, even if the player holds down A
                if (nouvelleTouche.Buttons.LeftStick == ButtonState.Pressed &&
                    AncienneTouche.Buttons.LeftStick == ButtonState.Released)
                {
                    //if( nouvellePosition > anciennePosition)
                    // {
                    //     Position.X += 1;
                    // }

                    //if( nouvellePosition < anciennePosition)
                    // {
                    //      Position.X -= 1;
                    // }
                }

                if (GestionManette.EstNouvelleTouche(numJoueur, Buttons.A))
                {
                    //float i = ascension;
                    //int descente = 0;
                    //while(i > 0)
                    //{
                    //    Position.Y += ascension;
                    //    ++descente;
                    //    ascension -= descente;
                    //}
                }

                AncienneTouche = nouvelleTouche;
            }
        }