using StardewModdingAPI.Events; namespace StardewModdingAPI.Framework.Events { /// Manages access to events raised by SMAPI. internal class ModEvents : IModEvents { /********* ** Accessors *********/ /// 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 IGameLoopEvents GameLoop { get; } /// Events raised when the player provides input using a controller, keyboard, or mouse. public IInputEvents Input { get; } /// Events raised when something changes in the world. public IWorldEvents World { get; } /********* ** Public methods *********/ /// Construct an instance. /// The mod which uses this instance. /// The underlying event manager. public ModEvents(IModMetadata mod, EventManager eventManager) { this.GameLoop = new ModGameLoopEvents(mod, eventManager); this.Input = new ModInputEvents(mod, eventManager); this.World = new ModWorldEvents(mod, eventManager); } } }