예제 #1
0
 public OptionsSon()
 {
     xPos = 3 * TurkeySmashGame.manager.PreferredBackBufferWidth / 4;
     yPos = TurkeySmashGame.manager.PreferredBackBufferHeight / 4;
     bouton1 = new Font(xPos, yPos + 100);
     bouton1MOINS = new BoutonTexte(xPos - 75, yPos + 100);
     bouton1PLUS = new BoutonTexte(xPos + 75, yPos + 100);
     bouton2 = new BoutonTexte(xPos, yPos + 200);
     bouton1MOINS.Texte = "Vol-";
     bouton1PLUS.Texte = "Vol+";
     bouton2.Texte = "Retour";
 }
예제 #2
0
 public void Load(AnimatedModel[] players)
 {
     int i = 0;
     foreach (Personnage player in players)
     {
         if (player != null)
         {
             pourcentages[i] = new Font((i + 1) * (TurkeySmashGame.manager.PreferredBackBufferWidth / 4),
                                     (3.5f * TurkeySmashGame.manager.PreferredBackBufferHeight / 4));
             pourcentages[i].NameFont = "Pourcent";
             pourcentages[i].Load(TurkeySmashGame.content);
             pourcentages[i].SizeText = 1.0f;
             playersCount++;
             i++;
         }
     }
     pourcentages[0].Color = Color.Red;
 }
예제 #3
0
        public void Load(Character[] players)
        {
            timerFont = new Font(TurkeySmashGame.WindowSize.X / 2, TurkeySmashGame.WindowSize.Y / 10);
            timerFont.NameFont = "Pourcent";
            timerFont.Load(TurkeySmashGame.content);
            timerFont.SizeText = 1.0f;
            if (SelectionNiveau.niveauSelect == "level1")
                timerFont.Color = Color.Black;
            else
             timerFont.Color = Color.White;

            if (OptionsCombat.TypePartieSelect == "temps")
                timer = OptionsCombat.TempsPartie * 60000 ; //60*1000 = 1 min en millisecond
            else
                timer = 0;

            for (int i = 0; i < players.Length; i++)
            {
                if (players[i] != null)
                {
                    pourcentages[i] = new Font((i + 1) * (TurkeySmashGame.manager.PreferredBackBufferWidth / 5),
                                            (7 * TurkeySmashGame.manager.PreferredBackBufferHeight / 8));
                    pourcentages[i].NameFont = "Pourcent";
                    pourcentages[i].Load(TurkeySmashGame.content);
                    pourcentages[i].SizeText = 1.3f;

                    icone[i] = new Sprite((i + 1) * (TurkeySmashGame.manager.PreferredBackBufferWidth / 5) - 250,
                                        (7 * TurkeySmashGame.manager.PreferredBackBufferHeight / 8 - 120));
                    if (OptionsCombat.TypePartieSelect == "vie")
                    {
                        xlife[i] = new Font((i + 1) * (TurkeySmashGame.manager.PreferredBackBufferWidth / 5),
                            4 * TurkeySmashGame.manager.PreferredBackBufferHeight / 5);

                        iconeLife[i] = new Sprite((i + 1) * (TurkeySmashGame.manager.PreferredBackBufferWidth / 5) - 50
                            ,TurkeySmashGame.manager.PreferredBackBufferHeight * 0.78f);

                        xlife[i].NameFont = "Pourcent";
                        xlife[i].Load(TurkeySmashGame.content);
                        xlife[i].SizeText = 0.5f;
                    }
                    if (OptionsCombat.TypePartieSelect == "temps")
                    {
                        scores[i] = new Font((i + 1) * (TurkeySmashGame.manager.PreferredBackBufferWidth / 5),
                            4 * TurkeySmashGame.manager.PreferredBackBufferHeight / 5);
                        scores[i].NameFont = "Pourcent";
                        scores[i].Load(TurkeySmashGame.content);
                        scores[i].SizeText = 0.6f;
                    }

                    if (players[i].definition.AssetName == "Jeu\\naruto")
                    {
                        icone[i].Load(TurkeySmashGame.content, "HUD\\HUDnaruto");
                        if (OptionsCombat.TypePartieSelect == "vie")
                            iconeLife[i].Load(TurkeySmashGame.content, "HUD\\HUDnarutoLifeIcone");
                    }

                    if (players[i].definition.AssetName == "Jeu\\sakura")
                    {
                        icone[i].Load(TurkeySmashGame.content, "HUD\\HUDSakura");
                        if (OptionsCombat.TypePartieSelect == "vie")
                            iconeLife[i].Load(TurkeySmashGame.content, "HUD\\HUDsakuraLifeIcone");
                    }

                    if (players[i].definition.AssetName == "Jeu\\sai")
                    {
                        icone[i].Load(TurkeySmashGame.content, "HUD\\HUDsai");
                        if (OptionsCombat.TypePartieSelect == "vie")
                            iconeLife[i].Load(TurkeySmashGame.content, "HUD\\HUDsaiLifeIcone");
                    }

                    if (players[i].definition.AssetName == "Jeu\\suigetsu")
                    {
                        icone[i].Load(TurkeySmashGame.content, "HUD\\HUDsuigetsu");
                        if (OptionsCombat.TypePartieSelect == "vie")
                            iconeLife[i].Load(TurkeySmashGame.content, "HUD\\HUDsuigetsuLifeIcone");
                    }
                    if (players[i].definition.AssetName == "Jeu\\turkey")
                    {
                        icone[i].Load(TurkeySmashGame.content, "HUD\\HUDTurkey");
                        if (OptionsCombat.TypePartieSelect == "vie")
                            iconeLife[i].Load(TurkeySmashGame.content, "HUD\\HUDTurkeyLifeIcone");
                    }
                }
            }
        }