Exemple #1
0
        public void HistoryCardDealt(RawCard card, Player player)
        {
            Card cardToAdd = new Card(card);

            cardToAdd.Raw.Player = player.ID;
            cardsInHands.addCard(cardToAdd);

            if (playingLastRound)
            {
                if (cardsInHands.getCards().Contains(cardToAdd))
                {
                    UltraServer.Instance.network.SendCard(card, player);
                }
            }
        }
Exemple #2
0
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        public void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            screenSize = new Point(graphics.GraphicsDevice.DisplayMode.Width, graphics.GraphicsDevice.DisplayMode.Height);
            DebugGUI.init(graphics.GraphicsDevice);
            ScaleManager.setDefaultValues(screenSize);
            Card.setDefaultScale(ScaleManager.CardScale);

            button = this.Content.Load <Texture2D>("button.9.png");

            Card.setTexture(this.Content.Load <Texture2D>("cards.png"));
            DebugCards.init();

            font11pt = this.Content.Load <SpriteFont>("mgcb\\V5Extender11");
            font22pt = this.Content.Load <SpriteFont>("mgcb\\V5Extender22");
            font33pt = this.Content.Load <SpriteFont>("mgcb\\V5Extender33");
            font44pt = this.Content.Load <SpriteFont>("mgcb\\V5Extender44");
            font55pt = this.Content.Load <SpriteFont>("mgcb\\V5Extender55");

            frameController = new FrameController();

            frameHand = new FrameHand(Vector2.Zero);
            frameController.addFrame(frameHand, VectorDirection.Down, true);

            CardContainer container = frameHand.addContainer();

            for (int i = 0; i < 20; i++)
            {
                container.addCard(DebugCards.draw());
            }
            CardSnap snap = new CardSnap(new Vector2(0, screenSize.Y), (float)screenSize.X, false);

            frameHand.addSnap(container, snap);
        }
Exemple #3
0
 public void dealtCard(RawCard card)
 {
     playerHand.addCard(new Card(card, new Vector2(screenSize.X * 0.5f, 0f)));
 }