2016-03-04 22:05:36 +08:00
|
|
|
|
using System;
|
|
|
|
|
|
|
|
|
|
namespace StardewModdingAPI.Events
|
|
|
|
|
{
|
|
|
|
|
public static class GraphicsEvents
|
|
|
|
|
{
|
|
|
|
|
public static event EventHandler Resize = delegate { };
|
|
|
|
|
public static event EventHandler DrawTick = delegate { };
|
2016-03-27 09:50:47 +08:00
|
|
|
|
public static event EventHandler DrawInRenderTargetTick = delegate { };
|
2016-03-04 22:05:36 +08:00
|
|
|
|
|
|
|
|
|
public static void InvokeDrawTick()
|
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
DrawTick.Invoke(null, EventArgs.Empty);
|
|
|
|
|
}
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
{
|
2016-03-27 09:50:47 +08:00
|
|
|
|
Log.Error("An exception occured in a Mod's DrawTick: " + ex);
|
2016-03-04 22:05:36 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2016-03-27 09:50:47 +08:00
|
|
|
|
public static void InvokeDrawInRenderTargetTick()
|
|
|
|
|
{
|
|
|
|
|
DrawInRenderTargetTick.Invoke(null, EventArgs.Empty);
|
|
|
|
|
}
|
|
|
|
|
|
2016-03-04 22:05:36 +08:00
|
|
|
|
public static void InvokeResize(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
Resize.Invoke(sender, e);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|