summaryrefslogtreecommitdiff
path: root/StardewModdingAPI/Events/Time.cs
diff options
context:
space:
mode:
Diffstat (limited to 'StardewModdingAPI/Events/Time.cs')
-rw-r--r--StardewModdingAPI/Events/Time.cs36
1 files changed, 36 insertions, 0 deletions
diff --git a/StardewModdingAPI/Events/Time.cs b/StardewModdingAPI/Events/Time.cs
new file mode 100644
index 00000000..fcf0b3e5
--- /dev/null
+++ b/StardewModdingAPI/Events/Time.cs
@@ -0,0 +1,36 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace StardewModdingAPI.Events
+{
+ public static class TimeEvents
+ {
+ public static event EventHandler<EventArgsIntChanged> TimeOfDayChanged = delegate { };
+ public static event EventHandler<EventArgsIntChanged> DayOfMonthChanged = delegate { };
+ public static event EventHandler<EventArgsIntChanged> YearOfGameChanged = delegate { };
+ public static event EventHandler<EventArgsStringChanged> SeasonOfYearChanged = delegate { };
+
+ public static void InvokeTimeOfDayChanged(Int32 priorInt, Int32 newInt)
+ {
+ TimeOfDayChanged.Invoke(null, new EventArgsIntChanged(priorInt, newInt));
+ }
+
+ public static void InvokeDayOfMonthChanged(Int32 priorInt, Int32 newInt)
+ {
+ DayOfMonthChanged.Invoke(null, new EventArgsIntChanged(priorInt, newInt));
+ }
+
+ public static void InvokeYearOfGameChanged(Int32 priorInt, Int32 newInt)
+ {
+ YearOfGameChanged.Invoke(null, new EventArgsIntChanged(priorInt, newInt));
+ }
+
+ public static void InvokeSeasonOfYearChanged(String priorString, String newString)
+ {
+ SeasonOfYearChanged.Invoke(null, new EventArgsStringChanged(priorString, newString));
+ }
+ }
+}