Ejemplo n.º 1
0
        public GameplayMenu(ContentManager content)
        {
            m_page           = 0;
            m_maxPages       = 0;
            m_numberOfTowers = 0;

            // A page consists of 5 tower buttons
            m_minIndex = m_page * 5;
            m_maxIndex = m_minIndex + 5;

            m_towerOptions = new List <TowerButton>();

            // Create the wave bar
            m_spawnBarTex = content.Load <Texture2D>("Art\\PlaceholderArt\\GameplayGUI\\WaveBar");
            m_spawnBarPos = new Vector2(828, 874);
            m_spawnBarSrc = new Rectangle(0, 0, m_spawnBarTex.Width, m_spawnBarTex.Height);

            // Set up the main tower menu.
            m_menu = new FreeFormMenu(content, "Art\\GameArt\\GameplayGUI\\TowerBar\\GameplayButton", false, new Vector2[] { new Vector2(72, 1044), new Vector2(864, 936), new Vector2(180, 936) });
            m_menu.Buttons[0].Ttip = new ToolTip(content.Load <Texture2D>("Art\\GameArt\\ToolTipBacking"), Game1.debugFont, new Vector2(0, 0), Color.White, Color.Black, Vector2.Zero, "Construct a new tower.");
            m_menu.Buttons[1].Ttip = new ToolTip(content.Load <Texture2D>("Art\\GameArt\\ToolTipBacking"), Game1.debugFont, new Vector2(0, 0), Color.White, Color.Black, Vector2.Zero, "Next Page");
            m_menu.Buttons[2].Ttip = new ToolTip(content.Load <Texture2D>("Art\\GameArt\\ToolTipBacking"), Game1.debugFont, new Vector2(0, 0), Color.White, Color.Black, Vector2.Zero, "Previous Page");
            m_selectionBorder      = new CenteredStaticGraphic(content.Load <Texture2D>("Art\\PlaceholderArt\\GameplayGUI\\TowersBorder"), new Vector2(522, 1008), Color.White, 1);
            m_menuBackground       = new CenteredStaticGraphic(content.Load <Texture2D>("Art\\PlaceholderArt\\GameplayGUI\\MenuBackground"), new Vector2(960, 976), Color.White, 1);
        }
Ejemplo n.º 2
0
        public SettingsMenu(ContentManager content)
        {
            m_menu       = new NormalMenu(content, "Art\\GameArt\\MenuGUI\\SettingsMenu\\MenuButton", false, false, 2, 200, new Vector2(960, 300));
            m_volumeMenu = new FreeFormMenu(content, "Art\\GameArt\\MenuGUI\\SettingsMenu\\VolumeButton", false, new Vector2[] { new Vector2(816, 400), new Vector2(1104, 400) });

            m_backing = new CenteredStaticGraphic(content.Load <Texture2D>("Art\\GameArt\\MenuGUI\\SettingsMenu\\VolumePercentBacking"), new Vector2(960, 400), Color.White, 1);
        }
Ejemplo n.º 3
0
        private void FillMinimapPixels(ContentManager content, UniMapData data)
        {
            for (int y = 0; y < m_mapSizeY; y++)
            {
                for (int x = 0; x < m_mapSizeX; x++)
                {
                    m_mapPixels[x, y] = new CenteredStaticGraphic(content.Load <Texture2D>("Art\\PlaceholderArt\\GameplayGUI\\MiniMapPixel"), new Vector2(1920 - (240 - (x * 3)), 1080 - (135 - (y * 3))), Color.White, 1);

                    // Add colours to the pixels for colour coding
                    if (data.WalkableGrid[x, y] <= 0)
                    {
                        m_mapPixels[x, y].AltTints.Add(Color.White);
                        m_mapPixels[x, y].AltTints.Add(new Color(100, 255, 100));
                        m_mapPixels[x, y].AltTints.Add(Color.Blue);
                        m_mapPixels[x, y].AltTints.Add(Color.Yellow);
                        m_mapPixels[x, y].AltTints.Add(Color.Orange);
                        m_mapPixels[x, y].AltTints.Add(Color.Red);
                    }
                    else
                    {
                        m_mapPixels[x, y].AltTints.Add(Color.Black);
                        m_mapPixels[x, y].AltTints.Add(Color.Magenta);
                    }
                }
            }
        }
        } // Set bar position

        public CharHealthBar LoadTextures(ContentManager content, string borderName, string barName, string backingName, float scale)
        {
            m_border             = new CenteredStaticGraphic(content.Load <Texture2D>(m_path + borderName), m_barCentre, Color.White, scale);
            m_healthBar          = new AnimGraphic(content.Load <Texture2D>(m_path + barName), m_barCentre, Color.White, Vector2.Zero, 0, scale, 1, 1, 1);
            m_healthBacking      = new CenteredStaticGraphic(content.Load <Texture2D>(m_path + backingName), m_barCentre, Color.White, scale);
            m_healthBacking.Tint = Color.Red;
            return(this);
        } // Load bar textures
Ejemplo n.º 5
0
        /// <summary>
        /// Manager Constructor
        /// </summary>
        /// <param name="content"> Content Manager </param>
        public TypingManager(ContentManager content)
        {
            TextIsNothing = false;
            EnterPressed  = false;
            BackPressed   = false;

            m_typer = new CenteredStaticGraphic(content.Load <Texture2D>("Art\\GameArt\\MenuGUI\\TyperHighlighter"), new Vector2(0, 0), Color.White, 1);
        }