Exemple #1
0
 /// <summary>
 /// The main entry point for the application.
 /// </summary>
 static void Main(string[] args)
 {
     using (GameInstance game = new GameInstance())
     {
         game.Run();
     }
 }
Exemple #2
0
        //ButtonUI resourceButton;
        public CardSelectedOverlay(
            GameInstance game,
            Card card,
            Vector2 originCardPosition,
            Vector2 goalCardPosition,
            float originCardRotation = 0.0f, 
            float goalCardRotation = 0.0f)
            : base(game)
        {
            this.card = card;
            this.flyInAnimation = new CardAnimation(card,
                                                    originCardPosition,
                                                    goalCardPosition,
                                                    10,
                                                    1.0f,
                                                    5.0f,
                                                    originCardRotation,
                                                    goalCardRotation,
                                                    false);
            this.flyOutAnimation = new CardAnimation(card,
                                                    goalCardPosition,
                                                    originCardPosition,
                                                    10,
                                                    5.0f,
                                                    1.0f,
                                                    goalCardRotation,
                                                    originCardRotation,
                                                    true);
            this.goalCardPosition = goalCardPosition;
            this.viewPort = new Rectangle(game.GraphicsDevice.PresentationParameters.Bounds.Width / 2, game.GraphicsDevice.PresentationParameters.Bounds.Height/2, game.GraphicsDevice.PresentationParameters.Bounds.Width, game.GraphicsDevice.PresentationParameters.Bounds.Height);

            this.playButton = new ButtonUI(game, new Rectangle(550, 420, 300, 100), 1, "Play!");
            //this.resourceButton = new ButtonUI(game, new Rectangle(400, 400, 205, 50), 3, "Resource");
        }
Exemple #3
0
 public HandZone(GameInstance game, Vector2 position)
     : base(game, position)
 {
     this.CardList = this.game.MainPlayer.Hand;
     this.mainPlayer = this.game.MainPlayer;
     this.cardDisplaySize = GameInstance.MAX_HAND_DISPLAY_SIZE;
     this.hoverFrameColor = Color.HotPink;
 }
Exemple #4
0
        public Player(GameInstance game)
        {
            this.game = game;
            this.Hand = new List<Card>();
            this.Deck = new Queue<Card>();
            this.DiscardPile = new List<Card>();

            this.ResetPoint();
        }
Exemple #5
0
        public MarketZone(GameInstance game, Vector2 position)
            : base(game, position)
        {
            this.CardList = new List<Card>();

            // Specific MarketZone Constant
            this.cardRotation = 0.0f;
            this.cardDistance = 70;
            this.zoneWidth = 340;
        }
Exemple #6
0
        public ButtonUI(GameInstance game, Rectangle destinationRectangle, int buttonType, string text)
        {
            this.game = game;
            this.destinationRectangle = destinationRectangle;
            this.buttonType = buttonType;
            this.text = text;

            this.hoverRectangle = new Rectangle(destinationRectangle.X, destinationRectangle.Y,
                destinationRectangle.Width - 10, destinationRectangle.Height - 20);

            this.stringSize = GameInstance.font.MeasureString(this.text);
        }
Exemple #7
0
        public NewZone(GameInstance game, List<Card> cardList, Vector2 position)
        {
            this.game = game;
            this.position = position;
            this.CardList = cardList;

            this.positionList = new Vector2[maxCardDisplaySize];
            this.scaleList = new float[maxCardDisplaySize];
            this.firstCardXPos = 30 + this.position.X + +
                             (GameInstance.CARD_WIDTH * GameInstance.CARD_SCALE / 2);
            this.lastCardXPos = this.firstCardXPos + this.cardDistance * (this.maxCardDisplaySize - 1);
            for (int i = 0; i < this.maxCardDisplaySize; i++)
            {
                float xPos = 30 + this.position.X + this.cardDistance * i +
                             (GameInstance.CARD_WIDTH * GameInstance.CARD_SCALE / 2);
                float yPos = 5 + this.position.Y +
                             (GameInstance.CARD_HEIGHT * GameInstance.CARD_SCALE / 2);
                positionList[i] = new Vector2(xPos, yPos);

                scaleList[i] = 1.0f;
            }
        }
Exemple #8
0
 public PlayZone(GameInstance game, Vector2 position)
     : base(game, position)
 {
     this.CardList = new List<Card>();
     this.zoneWidth = 320;
 }
Exemple #9
0
 public Overlay(GameInstance game)
 {
     this.game = game;
     this.state = OverlayState.FLY_IN;
     this.currentFrame = 0;
 }
Exemple #10
0
 public Controller(GameInstance game)
 {
     this.game = game;
 }
Exemple #11
0
 public virtual void Resolve(GameInstance game)
 {
 }
Exemple #12
0
 public Zone(GameInstance game, Vector2 position)
 {
     this.game = game;
     this.position = position;
 }