Exemplo n.º 1
0
        public GameState(Game1 _game, GraphicsDevice _graphicsDevice, ContentManager _content) : base(_game, _graphicsDevice, _content)
        {
            background = content.Load <Texture2D>("Images/Backgrounds/background2");
            gameFont   = content.Load <SpriteFont>("gameFont");

            deckManager = new DeckManager();
            deckManager.MakeDeck(deckManager.CardsInPlay["Deck"], _content);
            deckManager.ShuffleCards(deckManager.CardsInPlay["Deck"]);

            cardBack = new CardBack()
            {
                SpriteTexture = content.Load <Texture2D>("Images/Cards/Backs/2")
            };

            cardShadow = content.Load <Texture2D>("Images/Cards/cardShadow");

            playAgainButton = content.Load <Texture2D>("Images/MenuItems/playAgainButton");
            exitButton      = content.Load <Texture2D>("Images/MenuItems/exitButton");

            postit = content.Load <Texture2D>("Images/MenuItems/postit");
            pencil = content.Load <SpriteFont>("pencil");
            score  = 0;

            deckManager.CreateFoundationPiles(_content);
            deckManager.PopulateTableaus();

            selectMenuItem = content.Load <SoundEffect>("Sounds/SoundEffects/selectMenuItem");
            draw           = content.Load <SoundEffect>("Sounds/SoundEffects/draw");
            returnToDeck   = content.Load <SoundEffect>("Sounds/SoundEffects/returnToDeck");
            placeCard      = content.Load <SoundEffect>("Sounds/SoundEffects/placeCard");
            smiPlayed      = false;

            pmState = Mouse.GetState();

            clickTimer = 0;

            canWin = false;

            mcm = new MovingCardManager();

            msm = new MovingStackManager();
        }