Exemple #1
0
        private void loadTwoPlayerButtons(Texture2D overlay)
        {
            float btnPosX  = 2 * quarterScreenW - overlay.Width / 2f;
            float btnSpace = (quarterScreenH * 4 - quarterScreenH * 4 * .26f - 3f * overlay.Height) / 3;

            twoPlayerBtns[0] = new SSButton(Content.Load <Texture2D>(@"Buttons\SuitOnlineButton"),
                                            new Vector2(btnPosX, quarterScreenH), overlay, MenuStage.Online);
            twoPlayerBtns[1] = new SSButton(Content.Load <Texture2D>(@"Buttons\SuitLANButton"),
                                            new Vector2(btnPosX, twoPlayerBtns[0].Position.Y + overlay.Height + btnSpace), overlay, MenuStage.LAN);
        }
Exemple #2
0
        private void loadRocPapSciButtons(Texture2D overlay)
        {
            float btnPosY  = 2 * quarterScreenH - overlay.Height / 2;
            float btnSpace = (quarterScreenW * 4 - quarterScreenW * 4 * .25f - 3f * overlay.Width) / 3;

            rocPapSciBtns[0] = new SSButton(Content.Load <Texture2D>(@"Buttons\RockButton"),
                                            new Vector2(quarterScreenW * 4 * .15f, btnPosY), overlay, MenuStage.RockPaperScissorsPlaced);
            rocPapSciBtns[1] = new SSButton(Content.Load <Texture2D>(@"Buttons\PaperButton"),
                                            new Vector2(rocPapSciBtns[0].Position.X + overlay.Width + btnSpace, btnPosY), overlay, MenuStage.RockPaperScissorsPlaced);
            rocPapSciBtns[2] = new SSButton(Content.Load <Texture2D>(@"Buttons\ScissorsButton"),
                                            new Vector2(rocPapSciBtns[1].Position.X + overlay.Width + btnSpace, btnPosY), overlay, MenuStage.RockPaperScissorsPlaced);
        }
Exemple #3
0
        private void loadMainButtons(Texture2D overlay)
        {
            float btnPosX  = 2 * quarterScreenW - overlay.Width / 2f;
            float btnSpace = (quarterScreenH * 4 - quarterScreenH * 4 * .26f - 3f * overlay.Height) / 3;

            mainButtons[0] = new SSButton(Content.Load <Texture2D>(@"Buttons\SuitPlayButton"),
                                          new Vector2(btnPosX, quarterScreenH), overlay, MenuStage.Play);
            mainButtons[1] = new SSButton(Content.Load <Texture2D>(@"Buttons\SuitRulesButton"),
                                          new Vector2(btnPosX, mainButtons[0].Position.Y + overlay.Height + btnSpace), overlay, MenuStage.GameRules);
            mainButtons[2] = new SSButton(Content.Load <Texture2D>(@"Buttons\SuitSettingsButton"),
                                          new Vector2(btnPosX, mainButtons[1].Position.Y + overlay.Height + btnSpace), overlay, MenuStage.Settings);
        }
Exemple #4
0
        private void loadPlayButtons(Texture2D overlay)
        {
            float btnPosX  = 2 * quarterScreenW - overlay.Width / 2f;
            float btnSpace = (quarterScreenH * 4 - quarterScreenH * 4 * .55f - 3f * overlay.Height) / 3;

            playButtons[0] = new SSButton(Content.Load <Texture2D>(@"Buttons\SuitVeryEasyButton"),
                                          new Vector2(btnPosX, quarterScreenH * 4 * .1f), overlay, MenuStage.VeryEasy);
            playButtons[1] = new SSButton(Content.Load <Texture2D>(@"Buttons\SuitEasyButton"),
                                          new Vector2(btnPosX, playButtons[0].Position.Y + overlay.Height + btnSpace), overlay, MenuStage.Easy);
            playButtons[2] = new SSButton(Content.Load <Texture2D>(@"Buttons\SuitMediumButton"),
                                          new Vector2(btnPosX, playButtons[1].Position.Y + overlay.Height + btnSpace), overlay, MenuStage.Medium);
            playButtons[3] = new SSButton(Content.Load <Texture2D>(@"Buttons\SuitHardButton"),
                                          new Vector2(btnPosX, playButtons[2].Position.Y + overlay.Height + btnSpace), overlay, MenuStage.Hard);
            playButtons[4] = new SSButton(Content.Load <Texture2D>(@"Buttons\SuitVeryHardButton"),
                                          new Vector2(btnPosX, playButtons[3].Position.Y + overlay.Height + btnSpace), overlay, MenuStage.VeryHard);
            playButtons[5] = new SSButton(Content.Load <Texture2D>(@"Buttons\Suit2PlayerButton"),
                                          new Vector2(btnPosX, playButtons[4].Position.Y + overlay.Height + btnSpace), overlay, MenuStage.TwoPlayer);
        }
Exemple #5
0
        private void loadMenuButtons()
        {
            Texture2D overlay = Content.Load <Texture2D>(@"Buttons\ButtonCover");

            loadMainButtons(overlay);
            loadPlayButtons(overlay);
            loadTwoPlayerButtons(overlay);
            overlay = Content.Load <Texture2D>(@"Buttons\RocPapSciButton");
            loadRocPapSciButtons(overlay);
            overlay          = Content.Load <Texture2D>(@"Buttons\backBtnCover");
            backButton       = new SSButton(Content.Load <Texture2D>(@"Buttons\SuitBackButton"), new Vector2(20f, 20f), overlay, MenuStage.MainMenu);
            playButtons[6]   = backButton;
            gameRulesBtns[0] = backButton;
            settingsBtns[0]  = backButton;
            backButton       = new SSButton(Content.Load <Texture2D>(@"Buttons\SuitBackButton"), new Vector2(20f, 20f), overlay, MenuStage.Play);
            rocPapSciBtns[3] = backButton;
            twoPlayerBtns[2] = backButton;
        }
Exemple #6
0
        protected override void LoadContent()
        {
            spriteBatch = new SpriteBatch(Game.GraphicsDevice);

            SSEngine.DeckSprites["AceClub"]      = new CardSprite(Game.Content.Load <Texture2D>(@"DeckOfCards/AceClub"), RankValue.Ace, Suit.Club);
            SSEngine.DeckSprites["AceDiamond"]   = new CardSprite(Game.Content.Load <Texture2D>(@"DeckOfCards/AceDiamond"), RankValue.Ace, Suit.Diamond);
            SSEngine.DeckSprites["AceHearts"]    = new CardSprite(Game.Content.Load <Texture2D>(@"DeckOfCards/AceHearts"), RankValue.Ace, Suit.Hearts);
            SSEngine.DeckSprites["AceSpades"]    = new CardSprite(Game.Content.Load <Texture2D>(@"DeckOfCards/AceSpades"), RankValue.Ace, Suit.Spades);
            SSEngine.DeckSprites["DeuceClub"]    = new CardSprite(Game.Content.Load <Texture2D>(@"DeckOfCards/DeuceClub"), RankValue.Deuce, Suit.Club);
            SSEngine.DeckSprites["DeuceDiamond"] = new CardSprite(Game.Content.Load <Texture2D>(@"DeckOfCards/DeuceDiamond"), RankValue.Deuce, Suit.Diamond);
            SSEngine.DeckSprites["DeuceHearts"]  = new CardSprite(Game.Content.Load <Texture2D>(@"DeckOfCards/DeuceHearts"), RankValue.Deuce, Suit.Hearts);
            SSEngine.DeckSprites["DeuceSpades"]  = new CardSprite(Game.Content.Load <Texture2D>(@"DeckOfCards/DeuceSpades"), RankValue.Deuce, Suit.Spades);
            SSEngine.DeckSprites["ThreeClub"]    = new CardSprite(Game.Content.Load <Texture2D>(@"DeckOfCards/ThreeClub"), RankValue.Three, Suit.Club);
            SSEngine.DeckSprites["ThreeDiamond"] = new CardSprite(Game.Content.Load <Texture2D>(@"DeckOfCards/ThreeDiamond"), RankValue.Three, Suit.Diamond);
            SSEngine.DeckSprites["ThreeHearts"]  = new CardSprite(Game.Content.Load <Texture2D>(@"DeckOfCards/ThreeHearts"), RankValue.Three, Suit.Hearts);
            SSEngine.DeckSprites["ThreeSpades"]  = new CardSprite(Game.Content.Load <Texture2D>(@"DeckOfCards/ThreeSpades"), RankValue.Three, Suit.Spades);
            SSEngine.DeckSprites["FourClub"]     = new CardSprite(Game.Content.Load <Texture2D>(@"DeckOfCards/FourClub"), RankValue.Four, Suit.Club);
            SSEngine.DeckSprites["FourDiamond"]  = new CardSprite(Game.Content.Load <Texture2D>(@"DeckOfCards/FourDiamond"), RankValue.Four, Suit.Diamond);
            SSEngine.DeckSprites["FourHearts"]   = new CardSprite(Game.Content.Load <Texture2D>(@"DeckOfCards/FourHearts"), RankValue.Four, Suit.Hearts);
            SSEngine.DeckSprites["FourSpades"]   = new CardSprite(Game.Content.Load <Texture2D>(@"DeckOfCards/FourSpades"), RankValue.Four, Suit.Spades);
            SSEngine.DeckSprites["FiveClub"]     = new CardSprite(Game.Content.Load <Texture2D>(@"DeckOfCards/FiveClub"), RankValue.Five, Suit.Club);
            SSEngine.DeckSprites["FiveDiamond"]  = new CardSprite(Game.Content.Load <Texture2D>(@"DeckOfCards/FiveDiamond"), RankValue.Five, Suit.Diamond);
            SSEngine.DeckSprites["FiveHearts"]   = new CardSprite(Game.Content.Load <Texture2D>(@"DeckOfCards/FiveHearts"), RankValue.Five, Suit.Hearts);
            SSEngine.DeckSprites["FiveSpades"]   = new CardSprite(Game.Content.Load <Texture2D>(@"DeckOfCards/FiveSpades"), RankValue.Five, Suit.Spades);
            SSEngine.DeckSprites["SixClub"]      = new CardSprite(Game.Content.Load <Texture2D>(@"DeckOfCards/SixClub"), RankValue.Six, Suit.Club);
            SSEngine.DeckSprites["SixDiamond"]   = new CardSprite(Game.Content.Load <Texture2D>(@"DeckOfCards/SixDiamond"), RankValue.Six, Suit.Diamond);
            SSEngine.DeckSprites["SixHearts"]    = new CardSprite(Game.Content.Load <Texture2D>(@"DeckOfCards/SixHearts"), RankValue.Six, Suit.Hearts);
            SSEngine.DeckSprites["SixSpades"]    = new CardSprite(Game.Content.Load <Texture2D>(@"DeckOfCards/SixSpades"), RankValue.Six, Suit.Spades);
            SSEngine.DeckSprites["SevenClub"]    = new CardSprite(Game.Content.Load <Texture2D>(@"DeckOfCards/SevenClub"), RankValue.Seven, Suit.Club);
            SSEngine.DeckSprites["SevenDiamond"] = new CardSprite(Game.Content.Load <Texture2D>(@"DeckOfCards/SevenDiamond"), RankValue.Seven, Suit.Diamond);
            SSEngine.DeckSprites["SevenHearts"]  = new CardSprite(Game.Content.Load <Texture2D>(@"DeckOfCards/SevenHearts"), RankValue.Seven, Suit.Hearts);
            SSEngine.DeckSprites["SevenSpades"]  = new CardSprite(Game.Content.Load <Texture2D>(@"DeckOfCards/SevenSpades"), RankValue.Seven, Suit.Spades);
            SSEngine.DeckSprites["EightClub"]    = new CardSprite(Game.Content.Load <Texture2D>(@"DeckOfCards/EightClub"), RankValue.Eight, Suit.Club);
            SSEngine.DeckSprites["EightDiamond"] = new CardSprite(Game.Content.Load <Texture2D>(@"DeckOfCards/EightDiamond"), RankValue.Eight, Suit.Diamond);
            SSEngine.DeckSprites["EightHearts"]  = new CardSprite(Game.Content.Load <Texture2D>(@"DeckOfCards/EightHearts"), RankValue.Eight, Suit.Hearts);
            SSEngine.DeckSprites["EightSpades"]  = new CardSprite(Game.Content.Load <Texture2D>(@"DeckOfCards/EightSpades"), RankValue.Eight, Suit.Spades);
            SSEngine.DeckSprites["NineClub"]     = new CardSprite(Game.Content.Load <Texture2D>(@"DeckOfCards/NineClub"), RankValue.Nine, Suit.Club);
            SSEngine.DeckSprites["NineDiamond"]  = new CardSprite(Game.Content.Load <Texture2D>(@"DeckOfCards/NineDiamond"), RankValue.Nine, Suit.Diamond);
            SSEngine.DeckSprites["NineHearts"]   = new CardSprite(Game.Content.Load <Texture2D>(@"DeckOfCards/NineHearts"), RankValue.Nine, Suit.Hearts);
            SSEngine.DeckSprites["NineSpades"]   = new CardSprite(Game.Content.Load <Texture2D>(@"DeckOfCards/NineSpades"), RankValue.Nine, Suit.Spades);
            SSEngine.DeckSprites["TenClub"]      = new CardSprite(Game.Content.Load <Texture2D>(@"DeckOfCards/TenClub"), RankValue.Ten, Suit.Club);
            SSEngine.DeckSprites["TenDiamond"]   = new CardSprite(Game.Content.Load <Texture2D>(@"DeckOfCards/TenDiamond"), RankValue.Ten, Suit.Diamond);
            SSEngine.DeckSprites["TenHearts"]    = new CardSprite(Game.Content.Load <Texture2D>(@"DeckOfCards/TenHearts"), RankValue.Ten, Suit.Hearts);
            SSEngine.DeckSprites["TenSpades"]    = new CardSprite(Game.Content.Load <Texture2D>(@"DeckOfCards/TenSpades"), RankValue.Ten, Suit.Spades);
            SSEngine.DeckSprites["JackClub"]     = new CardSprite(Game.Content.Load <Texture2D>(@"DeckOfCards/JackClub"), RankValue.Jack, Suit.Club);
            SSEngine.DeckSprites["JackDiamond"]  = new CardSprite(Game.Content.Load <Texture2D>(@"DeckOfCards/JackDiamond"), RankValue.Jack, Suit.Diamond);
            SSEngine.DeckSprites["JackHearts"]   = new CardSprite(Game.Content.Load <Texture2D>(@"DeckOfCards/JackHearts"), RankValue.Jack, Suit.Hearts);
            SSEngine.DeckSprites["JackSpades"]   = new CardSprite(Game.Content.Load <Texture2D>(@"DeckOfCards/JackSpades"), RankValue.Jack, Suit.Spades);
            SSEngine.DeckSprites["QueenClub"]    = new CardSprite(Game.Content.Load <Texture2D>(@"DeckOfCards/QueenClub"), RankValue.Queen, Suit.Club);
            SSEngine.DeckSprites["QueenDiamond"] = new CardSprite(Game.Content.Load <Texture2D>(@"DeckOfCards/QueenDiamond"), RankValue.Queen, Suit.Diamond);
            SSEngine.DeckSprites["QueenHearts"]  = new CardSprite(Game.Content.Load <Texture2D>(@"DeckOfCards/QueenHearts"), RankValue.Queen, Suit.Hearts);
            SSEngine.DeckSprites["QueenSpades"]  = new CardSprite(Game.Content.Load <Texture2D>(@"DeckOfCards/QueenSpades"), RankValue.Queen, Suit.Spades);
            SSEngine.DeckSprites["KingClub"]     = new CardSprite(Game.Content.Load <Texture2D>(@"DeckOfCards/KingClub"), RankValue.King, Suit.Club);
            SSEngine.DeckSprites["KingDiamond"]  = new CardSprite(Game.Content.Load <Texture2D>(@"DeckOfCards/KingDiamond"), RankValue.King, Suit.Diamond);
            SSEngine.DeckSprites["KingHearts"]   = new CardSprite(Game.Content.Load <Texture2D>(@"DeckOfCards/KingHearts"), RankValue.King, Suit.Hearts);
            SSEngine.DeckSprites["KingSpades"]   = new CardSprite(Game.Content.Load <Texture2D>(@"DeckOfCards/KingSpades"), RankValue.King, Suit.Spades);

            CardSprite cardBack        = new CardSprite(Game.Content.Load <Texture2D>(@"DeckOfCards/CardBack"));
            Vector2    discardPosition = new Vector2(3 * SSEngine.QuarterSceenWidth - 2 * cardBack.Texture.Width,
                                                     2 * SSEngine.QuarterSceenHeight - cardBack.Texture.Height / 2);
            CardSprite discardpileSprite = new CardSprite(Game.Content.Load <Texture2D>("DiscardPile"), discardPosition);

            discardPile  = new DiscardPile(discardpileSprite);
            deckPosition = new Vector2(3 * SSEngine.QuarterSceenWidth - discardpileSprite.Texture.Width / 2,
                                       2 * SSEngine.QuarterSceenHeight - discardpileSprite.Texture.Height / 2);
            CardSprite  deckSprite = new CardSprite(Game.Content.Load <Texture2D>("DeckPile"), deckPosition);
            SoundEffect setSound   = Game.Content.Load <SoundEffect>(@"Audio\CardSet");

            deckPile = new DeckPile(deckSprite, cardBack, Game.Content.Load <SoundEffect>(@"Audio\CardShuffle"),
                                    Game.Content.Load <SoundEffect>(@"Audio\DrawCard"), setSound);
            deckPile.ShuffleDeck();
            playerCards1 = new PlayerHand(Game.Content.Load <Texture2D>(@"Hand\ArrowButtonL"),
                                          Game.Content.Load <Texture2D>(@"Hand\ArrowButtonCoverL"), Game.Content.Load <Texture2D>(@"Hand\ArrowButtonR"),
                                          Game.Content.Load <Texture2D>(@"Hand\ArrowButtonCoverR"), cardBack.Texture, setSound);
            playerCards2 = new AIHand(cardBack.Texture, setSound);
            font         = Game.Content.Load <SpriteFont>(@"Fonts\GameFont");
            Texture2D overlay = Game.Content.Load <Texture2D>(@"Buttons\backBtnCover");

            backButton    = new SSButton(Game.Content.Load <Texture2D>(@"Buttons\SuitBackButton"), new Vector2(20f, 20f), overlay, MenuStage.Play);
            overlay       = Game.Content.Load <Texture2D>(@"Buttons\ButtonCover");
            endTurnButton = new Button(Game.Content.Load <Texture2D>(@"Buttons\SuitEndTurnButton"),
                                       new Vector2(3 * SSEngine.QuarterSceenWidth + discardpileSprite.Texture.Width,
                                                   2 * SSEngine.QuarterSceenHeight - overlay.Height / 2), overlay);
            panel = new SelectPanel(Game.Content, "Change To");
            base.LoadContent();
        }