protected override void DrawCore(DrawContext context) { if (Asset != null) { context.Draw(Asset, Bounds, SourceRectangle, Color, Rotation, Origin, Effects, Depth); } }
public void Draw(DrawContext context) { if (!IsDead) { var min = StartAlpha > EndAlpha ? EndAlpha : StartAlpha; var max = StartAlpha < EndAlpha ? EndAlpha : StartAlpha; CurrentAlpha = (StartAlpha - EndAlpha) * LifeTime; CurrentAlpha = MathHelper.Clamp(CurrentAlpha, min, max); context.Draw(_texture, _rectangle, null, new Color(Color, CurrentAlpha), Rotation, Origin, SpriteEffects.None, 1f); } }
/// <summary> /// /// </summary> /// <param name="context"></param> protected override void DrawCore(DrawContext context) { var rectangle = new Rectangle((int)StartPosition.X, (int)StartPosition.Y, (int)Distance, 1); context.Draw(_texture, rectangle, null, _color, Direction, Vector2.Zero, SpriteEffects.None, 0f); }
protected override void DrawCore(DrawContext context) { context.Draw(Texture, new Rectangle((int)InitialPosition.X, (int)InitialPosition.Y, (int)EndPosition.X, Height), Color.White); }
public override void DrawChar(DrawContext context) { context.Draw(_symbol.ToString()); }