using System;
using StardewModdingAPI.Framework.Events;
namespace StardewModdingAPI.Events
{
/// Events raised when the in-game date or time changes.
public static class TimeEvents
{
/*********
** Properties
*********/
/// The core event manager.
private static EventManager EventManager;
/*********
** Events
*********/
/// Raised after the game begins a new day, including when loading a save.
public static event EventHandler AfterDayStarted
{
add => TimeEvents.EventManager.Legacy_AfterDayStarted.Add(value);
remove => TimeEvents.EventManager.Legacy_AfterDayStarted.Remove(value);
}
/// Raised after the in-game clock changes.
public static event EventHandler TimeOfDayChanged
{
add => TimeEvents.EventManager.Legacy_TimeOfDayChanged.Add(value);
remove => TimeEvents.EventManager.Legacy_TimeOfDayChanged.Remove(value);
}
/*********
** Public methods
*********/
/// Initialise the events.
/// The core event manager.
internal static void Init(EventManager eventManager)
{
TimeEvents.EventManager = eventManager;
}
}
}