diff options
author | Jesse Plamondon-Willard <github@jplamondonw.com> | 2018-10-08 18:57:09 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <github@jplamondonw.com> | 2018-10-08 18:57:09 -0400 |
commit | ec6025aad35addab8121a31d1c4abf667fd5210a (patch) | |
tree | 5f7ea2836180adc1f26e05110f8f28ab18b61e8e /src/SMAPI/Events/TimeChangedEventArgs.cs | |
parent | 79705448f57c962e9331fb802097c24d2424476c (diff) | |
download | SMAPI-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.cs | 30 |
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; + } + } +} |