コード例 #1
0
 public SelectionNiveau()
 {
     bouton1 = new BoutonImage();
     bouton2 = new BoutonImage();
     bouton3 = new BoutonTexte(TurkeySmashGame.manager.PreferredBackBufferWidth / 2, 700);
     bouton3.Texte = "Retour";
 }
コード例 #2
0
ファイル: Langue.cs プロジェクト: TurketSmash/NewTurkeySmash
 public Langue()
 {
     xPos = 3 * TurkeySmashGame.manager.PreferredBackBufferWidth / 4;
     yPos = TurkeySmashGame.manager.PreferredBackBufferHeight / 4;
     bouton1 = new BoutonTexte(TurkeySmashGame.manager.PreferredBackBufferWidth * 0.5f, TurkeySmashGame.manager.PreferredBackBufferHeight * 0.4f);
     bouton2 = new BoutonTexte(TurkeySmashGame.manager.PreferredBackBufferWidth * 0.5f, TurkeySmashGame.manager.PreferredBackBufferHeight * 0.55f);
     bouton2.Texte = French ? "Retour" : "Back";
     texteBoutons.Add(antibug1); texteBoutons.Add(antibug2);
 }
コード例 #3
0
ファイル: Pause.cs プロジェクト: TurketSmash/TurkeySmash
 public Pause()
 {
     xPos = TurkeySmashGame.manager.PreferredBackBufferWidth / 4;
     yPos = TurkeySmashGame.manager.PreferredBackBufferHeight / 4;
     bouton1 = new BoutonTexte(xPos, yPos + 100);
     bouton2 = new BoutonTexte(xPos, yPos + 200);
     bouton3 = new BoutonTexte(xPos, yPos + 300);
     bouton1.Texte = "Retour";
     bouton2.Texte = "Selection des personnages";
     bouton3.Texte = "Menu Principal";
     MediaPlayer.Resume();
 }
コード例 #4
0
ファイル: OptionsSon.cs プロジェクト: TurketSmash/TurkeySmash
 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";
 }
コード例 #5
0
ファイル: Accueil.cs プロジェクト: TurketSmash/TurkeySmash
 public Accueil()
 {
     xPos = TurkeySmashGame.manager.PreferredBackBufferWidth / 4;
     yPos = TurkeySmashGame.manager.PreferredBackBufferHeight / 4;
     bouton1 = new BoutonTexte(xPos, yPos + 100);
     bouton2 = new BoutonTexte(xPos, yPos + 200);
     bouton3 = new BoutonTexte(xPos, yPos + 300);
     bouton4 = new BoutonTexte(xPos, yPos + 450);
     bouton1.Texte = "Jouer";
     bouton2.Texte = "Multijoueur";
     bouton3.Texte = "Options";
     bouton4.Texte = "Quitter";
 }
コード例 #6
0
        public OptionsSon()
        {
            xPos = 3 * TurkeySmashGame.manager.PreferredBackBufferWidth / 4;
            yPos = TurkeySmashGame.manager.PreferredBackBufferHeight / 4;
            bouton1MOINS = new BoutonTexte(TurkeySmashGame.manager.PreferredBackBufferWidth * 0.45f, TurkeySmashGame.manager.PreferredBackBufferHeight * 0.4f);
            bouton1PLUS = new BoutonTexte(TurkeySmashGame.manager.PreferredBackBufferWidth * 0.55f, TurkeySmashGame.manager.PreferredBackBufferHeight * 0.4f);
            bouton1Change = new BoutonTexte(TurkeySmashGame.manager.PreferredBackBufferWidth * 0.5f, TurkeySmashGame.manager.PreferredBackBufferHeight * 0.55f);
            bouton2 = new BoutonTexte(TurkeySmashGame.manager.PreferredBackBufferWidth * 0.5f, TurkeySmashGame.manager.PreferredBackBufferHeight * 0.7f);
            bouton1MOINS.Texte = "Vol-";
            bouton1PLUS.Texte = "Vol+";
            bouton1Change.Texte = Langue.French ? "Change de musique" : "Change Music";
            bouton2.Texte = Langue.French ?"Retour":"Back";

            texteBoutons.Add(antibug1); texteBoutons.Add(antibug2); texteBoutons.Add(antibug3); texteBoutons.Add(antibug4);
        }
コード例 #7
0
        public Resolution()
        {
            xPos = 3 * TurkeySmashGame.WindowSize.X / 4;
            yPos = TurkeySmashGame.WindowSize.Y / 4;
            bouton0 = new BoutonTexte(TurkeySmashGame.WindowSize.X * 0.5f, TurkeySmashGame.WindowSize.Y * 0.25f);
            bouton1 = new BoutonTexte(TurkeySmashGame.WindowSize.X * 0.5f, TurkeySmashGame.WindowSize.Y * 0.4f);
            bouton2 = new BoutonTexte(TurkeySmashGame.WindowSize.X * 0.5f, TurkeySmashGame.WindowSize.Y * 0.55f);
            bouton3 = new BoutonTexte(TurkeySmashGame.WindowSize.X * 0.5f, TurkeySmashGame.WindowSize.Y * 0.7f);
            bouton4 = new BoutonTexte(TurkeySmashGame.WindowSize.X * 0.5f, TurkeySmashGame.WindowSize.Y * 0.85f);
            bouton0.Texte = Langue.French ? "Plein Ecran" : "Full Screen";
            bouton1.Texte = "1920 x 1080";
            bouton2.Texte = "1600 x 900";
            bouton3.Texte = "1280 x 720";
            bouton4.Texte = Langue.French ? "Retour" : "Back";

            texteBoutons.Add(antibug1); texteBoutons.Add(antibug2); texteBoutons.Add(antibug3); texteBoutons.Add(antibug4); texteBoutons.Add(antibug5);
        }
コード例 #8
0
        public EndGameScreen()
        {
            boutonRejouer = new BoutonTexte(TurkeySmashGame.WindowSize.X * 0.15f , TurkeySmashGame.WindowSize.Y * 0.1f);
            boutonMainMenu = new BoutonTexte(TurkeySmashGame.WindowSize.X * 0.85f, TurkeySmashGame.WindowSize.Y * 0.1f);
            boutonRejouer.Texte = Langue.French ? "Rejouer" : "Replay";
            boutonMainMenu.Texte = Langue.French ?"Menu Principal" : "Main Menu";
            boutonRejouer.SizeText = 1.2f;
            boutonMainMenu.SizeText = 1f;
            boutonRejouer.colorOn = Color.Red; boutonRejouer.colorOff = Color.DarkRed;
            boutonMainMenu.colorOn = Color.Red; boutonMainMenu.colorOff = Color.DarkRed;

            #region affichage joueurs
            float YjoueurPos = Ypos * 0.333f;

            for (int i = 0; i < 4; i++)
                if (Results.ResultsBoard[i][1] != -999) // Si il y a 3 joueurs
                {
                    joueurs[i] = new Texte((Xpos / 8) + ((Xpos / 4) * (Results.ResultsBoard[i][0] - 1)), YjoueurPos);
                    joueurs[i].Texte = (Langue.French ? "Joueur " : "Player ") + Results.ResultsBoard[i][0];
                }

            #endregion
            #region affichage frames
            float YframePos = Ypos * 0.205f;
            posFrames[0] = -5;
            posFrames[1] = posFrames[0] + Xpos / 4;
            posFrames[2] = posFrames[1] + Xpos / 4;
            posFrames[3] = posFrames[2] + Xpos / 4;

            goldFrame = new ImageMenu(posFrames[Results.ResultsBoard[0][0]/* = num du joueur qui est 1er au classement*/ - 1], YframePos);
            silverFrame = new ImageMenu(posFrames[Results.ResultsBoard[1][0] - 1], YframePos);
            if(Results.ResultsBoard[2][1] != -999) // Si il y a 3 joueurs
                bronzeFrame = new ImageMenu(posFrames[Results.ResultsBoard[2][0] - 1], YframePos);

            if (Results.ResultsBoard[3][1] != -999) // Si il y a 4 joueurs
                bronzeFrame2 = new ImageMenu(posFrames[Results.ResultsBoard[3][0] - 1], YframePos);
            #endregion
            #region affichage classementTxt

            float YclassPos = Ypos * 0.455f;
            posClassement[0] = Xpos * 0.155f;
            posClassement[1] = posClassement[0] + Xpos / 4;
            posClassement[2] = posClassement[1] + Xpos / 4;
            posClassement[3] = posClassement[2] + Xpos / 4;

            classement[0] = new Texte(posClassement[Results.ResultsBoard[0][0] - 1], YclassPos);
            classement[0].Texte = Langue.French ?"1er":"1st";

            classement[1] = new Texte(posClassement[Results.ResultsBoard[1][0] - 1], YclassPos);
            classement[1].Texte = "2nd";

            if (Results.ResultsBoard[2][1] != -999) // Si il y a 3 joueurs
            {
                classement[2] = new Texte(posClassement[Results.ResultsBoard[2][0] - 1], YclassPos);
                classement[2].Texte = Langue.French ? "3e" : "3rd";
            }

            if (Results.ResultsBoard[3][1] != -999) // Si il y a 4 joueurs
            {
                classement[3] = new Texte(posClassement[Results.ResultsBoard[3][0] - 1], YclassPos);
                classement[3].Texte = Langue.French ?"4e" :"4th";
            }
            #endregion
            #region affichage results
            float YresultPos = Ypos * 0.565f;
            posResults[0] = Xpos * 0.130f;
            posResults[1] = posResults[0] + Xpos/4;
            posResults[2] = posResults[1] + Xpos / 4;
            posResults[3] = posResults[2] + Xpos / 4;

            for (int i = 0; i < 4; i++)
                if (Results.ResultsBoard[i][1] != -999)
                {
                    results[i] = new Texte(posResults[Results.ResultsBoard[i][0] - 1], YresultPos);
                    results[i].Texte = "Score : " + Results.ResultsBoard[i][1];
                }
            #endregion
            #region affichage suicides

            float YautokilltPos = Ypos * 0.657f;
            posSuicide[0] = Xpos * 0.130f;
            posSuicide[1] = posSuicide[0] + Xpos / 4;
            posSuicide[2] = posSuicide[1] + Xpos / 4;
            posSuicide[3] = posSuicide[2] + Xpos / 4;

            for (int i = 0; i < 4; i++)
                if (Results.ResultsBoard[i][1] != -999)
                {
                    suicide[i] = new Texte(posSuicide[Results.ResultsBoard[i][0] - 1], YautokilltPos);
                    suicide[i].Texte = "Suicide : " + Results.ResultsBoard[i][2];
                }
            #endregion
            if (OptionsCombat.TypePartieSelect == "temps")
                #region affichage kills
            {
                float YkillsPos = Ypos * 0.730f;
                posKills[0] = Xpos * 0.130f;
                posKills[1] = posKills[0] + Xpos / 4;
                posKills[2] = posKills[1] + Xpos / 4;
                posKills[3] = posKills[2] + Xpos / 4;
                kills[0] = kills1;
                kills[1] = kills2;
                kills[2] = kills3;

                for (int i = 0; i < 4; i++)
                {
                    int con = 0;
                    for (int j = 0; j < 3; j++)
                    {
                        if (Results.ResultsBoard[i][1] != -999 & Results.ResultsBoard[j + 1][1] != -999)
                        {
                            int n = j + 1;
                            if ((Results.ResultsBoard[i][0]) == n)
                                con = 1;
                            n += con;
                            kills[j][i] = new Texte(posKills[Results.ResultsBoard[i][0] - 1], Ypos * (0.730f + (0.092f * j)));
                            kills[j][i].Texte = (Langue.French ?"Joueur " : "Player ") + n + (Langue.French ?" tues : ":" killed : ") + Results.ResultsBoard[i][3 + (n - 1)];
                        }
                    }
                }
            }
            #endregion
            if (OptionsCombat.TypePartieSelect == "vie")
                #region affichage temps
            {
                float YposTimers = Ypos * 0.810f;
                posTimers[0] = Xpos * 0.130f;
                posTimers[1] = posTimers[0] + Xpos / 4;
                posTimers[2] = posTimers[1] + Xpos / 4;
                posTimers[3] = posTimers[2] + Xpos / 4;

                for (int i = 0; i < 4; i++)
                    if (Results.ResultsBoard[i][1] != -999)
                    {
                        timers[i] = new Texte(posTimers[Results.ResultsBoard[i][0] - 1], YposTimers);
                        if (Results.ResultsBoard[i][3] != -1)
                        {
                            timers[i].Texte = ((Results.ResultsBoard[i][3] / 1000) / 60) + " : " + ((Results.ResultsBoard[i][3] / 1000) % 60);
                            timers[i].SizeText = 1.3f;
                        }
                        else
                        {
                            timers[i].Texte = (Langue.French ? ("Dernier" + "\n" + "Debout") : ("Last One" + "\n" + "Standing")); //last one standing
                        }
                    }
            }
                #endregion

            #region Code de porc
            texteBoutons.Add(antibug1); texteBoutons.Add(antibug2);
            #endregion
            MediaPlayer.Resume();
        }