void _sprite_CustomBehavior(Sprite sprite)
{
if (this.Click != null &&
InputManager.Mouse.ButtonPushed(Mouse.MouseButtons.LeftButton) &&
InputManager.Mouse.IsOn3D(this._sprite, false))
{
// Clicked on us
this.Click.Invoke(sprite);
}
if (this.MouseOver != null &&
InputManager.Mouse.IsOn3D(this._sprite, false))
{
this.MouseOver.Invoke();
}
if (this.OnMouseEnter != null)
{
if (InputManager.Mouse.IsOn3D(this._sprite, false) && !this._mouseWasOverLastTick)
{
this.OnMouseEnter.Invoke();
}
this._mouseWasOverLastTick = InputManager.Mouse.IsOn3D(this._sprite, false);
}
}