diff options
Diffstat (limited to 'StardewModdingAPI/Events')
-rw-r--r-- | StardewModdingAPI/Events/EventArgs.cs | 10 | ||||
-rw-r--r-- | StardewModdingAPI/Events/Graphics.cs | 8 | ||||
-rw-r--r-- | StardewModdingAPI/Events/Mine.cs | 6 |
3 files changed, 20 insertions, 4 deletions
diff --git a/StardewModdingAPI/Events/EventArgs.cs b/StardewModdingAPI/Events/EventArgs.cs index a6de3597..59fa1bbd 100644 --- a/StardewModdingAPI/Events/EventArgs.cs +++ b/StardewModdingAPI/Events/EventArgs.cs @@ -108,6 +108,16 @@ namespace StardewModdingAPI.Events }
public List<GameLocation> NewLocations { get; private set; }
}
+ public class EventArgsMineLevelChanged : EventArgs
+ {
+ public EventArgsMineLevelChanged(int previousMineLevel, int currentMineLevel)
+ {
+ PreviousMineLevel = previousMineLevel;
+ CurrentMineLevel = currentMineLevel;
+ }
+ public int PreviousMineLevel { get; private set; }
+ public int CurrentMineLevel { get; private set; }
+ }
public class EventArgsLocationObjectsChanged : EventArgs
{
diff --git a/StardewModdingAPI/Events/Graphics.cs b/StardewModdingAPI/Events/Graphics.cs index 87ee845b..db963924 100644 --- a/StardewModdingAPI/Events/Graphics.cs +++ b/StardewModdingAPI/Events/Graphics.cs @@ -6,6 +6,7 @@ namespace StardewModdingAPI.Events {
public static event EventHandler Resize = delegate { };
public static event EventHandler DrawTick = delegate { };
+ public static event EventHandler DrawInRenderTargetTick = delegate { };
public static void InvokeDrawTick()
{
@@ -15,10 +16,15 @@ namespace StardewModdingAPI.Events }
catch (Exception ex)
{
- Log.Error("An exception occured in XNA DrawTick: " + ex);
+ Log.Error("An exception occured in a Mod's DrawTick: " + ex);
}
}
+ public static void InvokeDrawInRenderTargetTick()
+ {
+ DrawInRenderTargetTick.Invoke(null, EventArgs.Empty);
+ }
+
public static void InvokeResize(object sender, EventArgs e)
{
Resize.Invoke(sender, e);
diff --git a/StardewModdingAPI/Events/Mine.cs b/StardewModdingAPI/Events/Mine.cs index 2f4e9ba7..f48e9574 100644 --- a/StardewModdingAPI/Events/Mine.cs +++ b/StardewModdingAPI/Events/Mine.cs @@ -4,11 +4,11 @@ namespace StardewModdingAPI.Events {
public static class MineEvents
{
- public static event EventHandler<EventArgsCurrentLocationChanged> MineLevelChanged = delegate { };
+ public static event EventHandler<EventArgsMineLevelChanged> MineLevelChanged = delegate { };
- public static void InvokeLocationsChanged(int currentMineLevel)
+ public static void InvokeMineLevelChanged(int previousMinelevel, int currentMineLevel)
{
-
+ MineLevelChanged.Invoke(null, new EventArgsMineLevelChanged(previousMinelevel, currentMineLevel));
}
}
}
|