public void Draw(Sprite sprite, Int32 x, Int32 y, Rectangle sourceRect) { Graphics.DrawImage(sprite.Image, x, y, sourceRect, GraphicsUnit.Pixel); }
public void AddSprite(Sprite sprite) { Sprites.Add(sprite); }
public virtual void Draw(Sprite sprite, Int32 x, Int32 y) { Graphics.DrawImage(sprite.Image, x, y); }
internal Boolean OnMouseMove(MouseEventArgs e) { foreach (var sprite in Sprites) { if (sprite.IsInRect(e.Location.X, e.Location.Y) == true) { if (_hoverSprite != null && _hoverSprite != sprite) _hoverSprite.OnMouseLeave(); _hoverSprite = sprite; } if (sprite.OnMouseMove(e) == true) return true; } if (MouseMove != null) { MouseMove(this, e); return true; } return false; }