Esempio n. 1
0
        public void DrawGUI(SpriteBatch sb)
        {
            int padding = 10, height = padding * 5, offset = 3;

            sb.Draw(Spritesheet, Camera.Position + new Vector2(padding - 7, padding - 3), new Rectangle(new Point((SpritesheetSize.X - 3) * Cell, 0), new Point(3 * Cell, 2 * Cell)), Color, 0, Vector2.Zero, 4, SpriteEffects.None, GUILayer);
            sb.Draw(Spritesheet, Camera.Position + new Vector2(padding - 7, padding - 3), new Rectangle(new Point((SpritesheetSize.X - 3) * Cell, 4 * Cell), new Point(3 * Cell, 2 * Cell)), Color.White, 0, Vector2.Zero, 4, SpriteEffects.None, GUILayer);

            //ExitButton.Position = new Vector2(Graphics.PreferredBackBufferWidth - padding - ExitButton.Background.Width, height + padding);
            ExitButton.Draw(sb);

            //STATS
            StatList.StatList.ForEach(x => x.Draw(sb));

            //TIMER
            sb.DrawString(FontSmall, ((int)(TurnTime - Time)).ToString(), Camera.Position + new Vector2(Graphics.PreferredBackBufferWidth - padding - FontSmall.MeasureString(((int)(TurnTime - Time)).ToString()).X - offset * 2, padding + offset), Color.White, 0, Vector2.Zero, 1, SpriteEffects.None, GUILayer);

            //ADD CARD BUTTON
            AddCardButton.Draw(sb);

            //CARDS
            Cards.ForEach(x => x.Draw(sb));

            if (HoveringCard != null)
            {
                HoveringCard.Draw(sb);
            }
        }
Esempio n. 2
0
        public void Update(GameTime gt)
        {
            Time += (float)gt.ElapsedGameTime.TotalSeconds;

            Cards.ForEach(x => x.Update(gt));

            foreach (Card c in Cards)
            {
                if (c.Used)
                {
                    Cards.Remove(c);
                    break;
                }
            }

            if (Debug.DiscoverOnClick && Mouse.CanPress && Mouse.LeftMouseDown)
            {
                Discover(5);
            }

            ExitButton.Update(gt);
            AddCardButton.Update(gt);

            UndiscoveredTiles.Cast <Tile>().ToList().ForEach(x => x.Update(gt));
        }