summaryrefslogtreecommitdiff
path: root/src/SMAPI/Events/TimeChangedEventArgs.cs
blob: d8349bd82452421c2a2c6ac48b8b101b7ea171b8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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>
        internal TimeChangedEventArgs(int oldTime, int newTime)
        {
            this.OldTime = oldTime;
            this.NewTime = newTime;
        }
    }
}