public override void Draw()
        {
            if (Shield.CurrentHP >= MIN_SHIELD_HP_FOR_SPRITE)
            {
                ShieldSprite.Draw(Engine.Instance.SpriteBatch);
            }

            // Round GUI
            if (SettingsMgr.Instance.ShowRoundGUI)
            {
                float hpLifeLeftPerc = HP.LifeLeftPercentage;

                Color hpColor = RoundGUIHPColorHigh;
                if (hpLifeLeftPerc < 25)
                {
                    hpColor = RoundGUIHPColorLow;
                }
                else if (hpLifeLeftPerc < 50)
                {
                    hpColor = RoundGUIHPColorMid;
                }

                Engine.Instance.SpriteBatch.Draw(RoundGUILeft, Location + RoundGUIOffsetLeft, new Rectangle(0 + (int)(hpLifeLeftPerc / 10) * 130, 0, 130, 130), hpColor);
                Engine.Instance.SpriteBatch.Draw(RoundGUILeft, Location + RoundGUIOffsetRight, new Rectangle(0 + (int)(Shield.LifeLeftPercentage / 10) * 130, 0, 130, 130), RoundGUIShieldColor, 0f, Vector2.Zero, 1f, SpriteEffects.FlipHorizontally, 0);
            }

            base.Draw();
        }
예제 #2
0
        public void Draw()
        {
            Animation.Draw(Engine.Instance.SpriteBatch, Vector2.Zero, 1f - FeetLoc.Y / Utils.DEPTH_DIVIDER);

            //HP bar
            if ((SettingsMgr.Instance.AlwaysShowHPBars && HP.CurrentHP < HP.MaxHP) || InputMgr.Instance.Keyboard.State.IsKeyDown(Keys.LeftAlt))
            {
                HPBar.SetLocation(Animation.Location.Xi(), Animation.Location.Yi() - HPBarSizeY);
                HPBar.Draw(Engine.Instance.SpriteBatch);
            }
        }
예제 #3
0
        public void Draw()
        {
            Animation.Draw(Engine.Instance.SpriteBatch, Vector2.Zero, LayerDepth);
            DebugDraw();

            if (Defenders.Count > 0)
            {
                RallyPointAni.Draw(Engine.Instance.SpriteBatch, RallyPoint, 0f);
            }

            foreach (BaseDefender defender in Defenders)
            {
                defender.Draw();
                defender.DebugDraw();
            }
        }
예제 #4
0
 public void Draw()
 {
     Animation.Draw(Engine.Instance.SpriteBatch, Vector2.Zero, 1f - FeetLoc.Y / Utils.DEPTH_DIVIDER);
 }
예제 #5
0
 public void Draw()
 {
     Animation.Draw(Engine.Instance.SpriteBatch);
 }