Пример #1
0
        public override void Draw(SpriteBatch spriteBatch)
        {
            base.Draw(spriteBatch);

            if (SceneManager.CurrentScene == SceneManager.mapScene)
            {
                ShieldBar.Draw(spriteBatch);
            }

            // Description
            if (Globals.MRectangle.Intersects(Box) && SceneManager.CurrentScene == SceneManager.mapScene)
            {
                Text.TextDifferentColor(spriteBatch, Description, new Vector2(Position.X + Texture.Width / 2 + 84, Position.Y - Texture.Height / 2), 1f, TextureManager.SpriteFont15, false);
            }
        }
Пример #2
0
        public void DrawGUI()
        {
            // HP bar
            Engine.Instance.SpriteBatch.Draw(BarEmpty, BarLocation, Color.White);
            HPBar.Draw(Engine.Instance.SpriteBatch);
            // Shield bar
            Engine.Instance.SpriteBatch.Draw(BarEmpty, ShieldBarLoc, Color.White);
            ShieldBar.Draw(Engine.Instance.SpriteBatch);
            // Heart
            Engine.Instance.SpriteBatch.Draw(Heart, BarHeartAddition, Color.White);

            // Weapons
            for (int i = 0; i < 5; i++)
            {
                // BG
                if (AquiredWeapons[i] == 0)
                {
                    Engine.Instance.SpriteBatch.Draw(WpnTextures[0], new Vector2(WpnLoc.X + i * 23, WpnLoc.Y), Color.White);
                }
                else if (AquiredWeapons[i] == 1)
                {
                    Engine.Instance.SpriteBatch.Draw(WpnTextures[1], new Vector2(WpnLoc.X + i * 23, WpnLoc.Y), Color.White);
                }
                else
                {
                    Engine.Instance.SpriteBatch.Draw(WpnTextures[7], new Vector2(WpnLoc.X + i * 23, WpnLoc.Y), Color.White);
                }

                Engine.Instance.SpriteBatch.Draw(WpnTextures[2 + i], new Vector2(WpnLoc.X + i * 23, WpnLoc.Y), Color.White);
            }

            // Kills
            Engine.Instance.SpriteBatch.Draw(KillSkull, KillSkullloc, Color.White);
            Engine.Instance.SpriteBatch.DrawString(KillFont, KillsSB, KillLoc, Color.White);

            // Nuclear
            for (int i = 0; i < Ship.NuclearCnt; i++)
            {
                Engine.Instance.SpriteBatch.Draw(NuclearIcon, NuclearLoc + new Vector2(i * 31, 0), Color.White);
            }
            ;

            // Score
            Engine.Instance.SpriteBatch.DrawString(ScoreFont, ScoreSB, ScoreLoc, Color.White);
        }