//////////////// 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); }
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; } }