2016-03-04 22:05:36 +08:00
|
|
|
|
using System;
|
|
|
|
|
|
|
|
|
|
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 { };
|
2016-03-27 15:52:43 +08:00
|
|
|
|
public static event EventHandler OnNewDay = delegate { };
|
2016-03-04 22:05:36 +08:00
|
|
|
|
|
2016-03-27 13:09:09 +08:00
|
|
|
|
public static void InvokeTimeOfDayChanged(int priorInt, int newInt)
|
2016-03-04 22:05:36 +08:00
|
|
|
|
{
|
|
|
|
|
TimeOfDayChanged.Invoke(null, new EventArgsIntChanged(priorInt, newInt));
|
|
|
|
|
}
|
|
|
|
|
|
2016-03-27 13:09:09 +08:00
|
|
|
|
public static void InvokeDayOfMonthChanged(int priorInt, int newInt)
|
2016-03-04 22:05:36 +08:00
|
|
|
|
{
|
|
|
|
|
DayOfMonthChanged.Invoke(null, new EventArgsIntChanged(priorInt, newInt));
|
|
|
|
|
}
|
|
|
|
|
|
2016-03-27 13:09:09 +08:00
|
|
|
|
public static void InvokeYearOfGameChanged(int priorInt, int newInt)
|
2016-03-04 22:05:36 +08:00
|
|
|
|
{
|
|
|
|
|
YearOfGameChanged.Invoke(null, new EventArgsIntChanged(priorInt, newInt));
|
|
|
|
|
}
|
|
|
|
|
|
2016-03-27 13:09:09 +08:00
|
|
|
|
public static void InvokeSeasonOfYearChanged(string priorString, string newString)
|
2016-03-04 22:05:36 +08:00
|
|
|
|
{
|
|
|
|
|
SeasonOfYearChanged.Invoke(null, new EventArgsStringChanged(priorString, newString));
|
|
|
|
|
}
|
2016-03-27 15:52:43 +08:00
|
|
|
|
|
|
|
|
|
public static void InvokeOnNewDay(int priorInt, int newInt)
|
|
|
|
|
{
|
|
|
|
|
OnNewDay.Invoke(null, new EventArgsIntChanged(priorInt, newInt));
|
|
|
|
|
}
|
2016-03-04 22:05:36 +08:00
|
|
|
|
}
|
2016-03-27 13:09:09 +08:00
|
|
|
|
}
|