Exemplo n.º 1
0
        ////////////////

        public void DrawSubHealth(InjuryMod mymod, SpriteBatch sb)
        {
            var   myplayer = (InjuryPlayer)TmlHelpers.SafelyGetModPlayer(Main.LocalPlayer, mymod, "InjuryPlayer");
            float percent  = myplayer.Logic.ComputeHarmBufferPercent(Main.LocalPlayer);

            this.DrawSubHealthAtPercent(sb, percent);
        }
Exemplo n.º 2
0
        public void DrawCurrentHeartDropAnimation(InjuryMod mymod, SpriteBatch sb)
        {
            if (!this.IsAnimatingHeartDrop)
            {
                return;
            }

            this.DrawHeartDropAnimationFrame(sb, this.HeartDropAnimation++, 32);

            if (this.HeartDropAnimation > 16)
            {
                this.HeartDropAnimation   = 0;
                this.IsAnimatingHeartDrop = false;
            }
        }