summaryrefslogtreecommitdiff
path: root/src/SMAPI/Events/TimeChangedEventArgs.cs
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <github@jplamondonw.com>2018-10-08 18:57:09 -0400
committerJesse Plamondon-Willard <github@jplamondonw.com>2018-10-08 18:57:09 -0400
commitec6025aad35addab8121a31d1c4abf667fd5210a (patch)
tree5f7ea2836180adc1f26e05110f8f28ab18b61e8e /src/SMAPI/Events/TimeChangedEventArgs.cs
parent79705448f57c962e9331fb802097c24d2424476c (diff)
downloadSMAPI-ec6025aad35addab8121a31d1c4abf667fd5210a.tar.gz
SMAPI-ec6025aad35addab8121a31d1c4abf667fd5210a.tar.bz2
SMAPI-ec6025aad35addab8121a31d1c4abf667fd5210a.zip
add more events (#310)
Diffstat (limited to 'src/SMAPI/Events/TimeChangedEventArgs.cs')
-rw-r--r--src/SMAPI/Events/TimeChangedEventArgs.cs30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/SMAPI/Events/TimeChangedEventArgs.cs b/src/SMAPI/Events/TimeChangedEventArgs.cs
new file mode 100644
index 00000000..fd472092
--- /dev/null
+++ b/src/SMAPI/Events/TimeChangedEventArgs.cs
@@ -0,0 +1,30 @@
+using System;
+
+namespace StardewModdingAPI.Events
+{
+ /// <summary>Event arguments for an <see cref="IGameLoopEvents.TimeChanged"/> event.</summary>
+ public class TimeChangedEventArgs : EventArgs
+ {
+ /*********
+ ** Accessors
+ *********/
+ /// <summary>The previous time of day in 24-hour notation (like 1600 for 4pm). The clock time resets when the player sleeps, so 2am (before sleeping) is 2600.</summary>
+ public int OldTime { get; }
+
+ /// <summary>The current time of day in 24-hour notation (like 1600 for 4pm). The clock time resets when the player sleeps, so 2am (before sleeping) is 2600.</summary>
+ public int NewTime { get; }
+
+
+ /*********
+ ** Public methods
+ *********/
+ /// <summary>Construct an instance.</summary>
+ /// <param name="oldTime">The previous time of day in 24-hour notation (like 1600 for 4pm).</param>
+ /// <param name="newTime">The current time of day in 24-hour notation (like 1600 for 4pm).</param>
+ public TimeChangedEventArgs(int oldTime, int newTime)
+ {
+ this.OldTime = oldTime;
+ this.NewTime = newTime;
+ }
+ }
+}