using System; namespace StardewModdingAPI.Events { /// Events linked to the game's update loop. The update loop runs roughly ≈60 times/second to run game logic like state changes, action handling, etc. These can be useful, but you should consider more semantic events like if possible. public interface IGameLoopEvents { /// Raised after the game is launched, right before the first update tick. This happens once per game session (unrelated to loading saves). All mods are loaded and initialised at this point, so this is a good time to set up mod integrations. event EventHandler GameLaunched; /// Raised before the game state is updated (≈60 times per second). event EventHandler UpdateTicking; /// Raised after the game state is updated (≈60 times per second). event EventHandler UpdateTicked; /// Raised before the game creates a new save file. event EventHandler SaveCreating; /// Raised after the game finishes creating the save file. event EventHandler SaveCreated; /// Raised before the game begins writes data to the save file (except the initial save creation). event EventHandler Saving; /// Raised after the game finishes writing data to the save file (except the initial save creation). event EventHandler Saved; /// Raised after the player loads a save slot. event EventHandler SaveLoaded; /// Raised after the game begins a new day (including when the player loads a save). event EventHandler DayStarted; /// Raised before the game ends the current day. This happens before it starts setting up the next day and before . event EventHandler DayEnding; /// Raised after the in-game clock time changes. event EventHandler TimeChanged; /// Raised after the game returns to the title screen. event EventHandler ReturnedToTitle; } }