Exemplo n.º 1
0
 public static void Allouer()
 {
     if (instance == null)
     {
         instance = new RessourceAudio();
     }
 }
Exemplo n.º 2
0
    public Menu()
    {
        RessourceAudio.Allouer();
        RessourceGraphique.Allouer();
        Ins                         = RessourceGraphique.Instance;
        mFenetre                    = Ins.Fenetre;
        mJouer                      = new BoutonTexture((float)VideoMode.DesktopMode.Width / 2 - (Ins.GetSpriteBouton(TypeBouton.JOUER_NORMAL).Texture.Size.X / 2), (float)VideoMode.DesktopMode.Height / 2, TypeBouton.JOUER_NORMAL, TypeBouton.JOUER_HOVER, TypeBouton.JOUER_APPUYER);
        mRegles                     = new BoutonTexture((float)VideoMode.DesktopMode.Width / 2 - (Ins.GetSpriteBouton(TypeBouton.REGLES_NORMAL).Texture.Size.X / 2), (float)VideoMode.DesktopMode.Height / 2 + 100, TypeBouton.REGLES_NORMAL, TypeBouton.REGLES_HOVER, TypeBouton.REGLES_APPUYER);
        mQuitter                    = new BoutonTexture((float)VideoMode.DesktopMode.Width / 2 - (Ins.GetSpriteBouton(TypeBouton.QUITTER_NORMAL).Texture.Size.X / 2), (float)VideoMode.DesktopMode.Height / 2 + 200, TypeBouton.QUITTER_NORMAL, TypeBouton.QUITTER_HOVER, TypeBouton.QUITTER_APPUYER);
        mContinuer                  = true;
        mSprtMenuPrincipal          = Ins.GetSpriteMenu();
        mSprtMenuPrincipal.Position = new Vector2f(0, 0);

        float X = (float)VideoMode.DesktopMode.Width / (float)mSprtMenuPrincipal.Texture.Size.X;
        float Y = (float)VideoMode.DesktopMode.Height / (float)mSprtMenuPrincipal.Texture.Size.Y;

        mSprtMenuPrincipal.Scale = new Vector2f(X, Y);
    }