diff options
Diffstat (limited to 'src/StardewModdingAPI/Events/EventArgsNewDay.cs')
-rw-r--r-- | src/StardewModdingAPI/Events/EventArgsNewDay.cs | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/src/StardewModdingAPI/Events/EventArgsNewDay.cs b/src/StardewModdingAPI/Events/EventArgsNewDay.cs new file mode 100644 index 00000000..b8cbe9e3 --- /dev/null +++ b/src/StardewModdingAPI/Events/EventArgsNewDay.cs @@ -0,0 +1,37 @@ +#if SMAPI_1_x +using System; + +namespace StardewModdingAPI.Events +{ + /// <summary>Event arguments for a <see cref="TimeEvents.OnNewDay"/> event.</summary> + public class EventArgsNewDay : EventArgs + { + /********* + ** Accessors + *********/ + /// <summary>The previous day value.</summary> + public int PreviousDay { get; } + + /// <summary>The current day value.</summary> + public int CurrentDay { get; } + + /// <summary>Whether the game just started the transition (<c>true</c>) or finished it (<c>false</c>).</summary> + public bool IsNewDay { get; } + + + /********* + ** Public methods + *********/ + /// <summary>Construct an instance.</summary> + /// <param name="priorDay">The previous day value.</param> + /// <param name="newDay">The current day value.</param> + /// <param name="isTransitioning">Whether the game just started the transition (<c>true</c>) or finished it (<c>false</c>).</param> + public EventArgsNewDay(int priorDay, int newDay, bool isTransitioning) + { + this.PreviousDay = priorDay; + this.CurrentDay = newDay; + this.IsNewDay = isTransitioning; + } + } +} +#endif
\ No newline at end of file |