/// <summary> /// Makes the object draw itself. /// </summary> /// <param name="sb"><see cref="ISpriteBatch"/> the object can use to draw itself with.</param> public void Draw(ISpriteBatch sb) { if (BeforeDraw != null) { BeforeDraw.Raise(this, EventArgsHelper.Create(sb)); } var drawPos = DrawPosition; _lastScreenPosition = drawPos - Parent.Camera.Min; if (IsVisible) { // Draw the character body _characterSprite.Draw(sb, drawPos, Heading, Color); // Draw the HP/MP DrawSPBar(sb, HPPercent, 0, new Color(255, 0, 0, 175)); DrawSPBar(sb, MPPercent, 1, new Color(0, 0, 255, 175)); // Draw the name DrawName(sb, NameFont); } if (AfterDraw != null) { AfterDraw.Raise(this, EventArgsHelper.Create(sb)); } }
public void Draw(ISpriteBatch sb) { _characterSprite.Draw(sb, Position, Direction.East, Color.White); }