Exemple #1
0
 void QuitterPartie()
 {
     CurrentGameState = GameState.MenuPrincipal;
     AfficherBoutons(0, 2);
     PartiEnCours.Retirer();
     Components.Remove(UnAfficheurFPS);
     Components.Remove(TempsB);
     Components.Remove(TempsN);
     Components.Remove(unAfficheur3D);
     Components.Remove(Anand);
     Components.Remove(PartiEnCours.TourActuel);
     ArrièrePlanDéroulant.ModifierActivation();
     Chanson.Stop();
 }
Exemple #2
0
        void CommencerPartie()
        {
            Chanson.Play();
            CaméraJeu.ResetCaméra(PositionCaméra, CibleCaméra, OVCaméra);
            TempsRestantB = TempsDePartie;
            TempsRestantN = TempsDePartie;
            TempsÉcrit    = ((int)(TempsDePartie / 60)).ToString() + ":" + ((int)(TempsDePartie % 60)).ToString();

            ArrièrePlanDéroulant.ModifierActivation();
            Components.Add(PartiEnCours   = new Partie(this, TempsDePartie, NomMap, CouleursÉchiquier, OrigineÉchiquier));
            Components.Add(UnAfficheurFPS = new AfficheurFps(this, "Arial", Color.Blue, INTERVALLE_CALCUL_FPS));
            Components.Add(TempsB         = new TexteAffichable(this, "Arial", TempsÉcrit, new Vector2((GraphicsDevice.Viewport.Width - UnAfficheurFPS.PositionDroiteBas.X), UnAfficheurFPS.PositionDroiteBas.Y), Color.White, 1f));
            Components.Add(TempsN         = new TexteAffichable(this, "Arial", TempsÉcrit, new Vector2((GraphicsDevice.Viewport.Width - UnAfficheurFPS.PositionDroiteBas.X), UnAfficheurFPS.PositionDroiteBas.Y), Color.Black, 1f));
            Components.Add(unAfficheur3D  = new Afficheur3D(this));
        }