summaryrefslogtreecommitdiff
path: root/src/SMAPI/Events/IGameLoopEvents.cs
blob: a56b3de3f502164c7161a1c1072fe7b96b1468b0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
using System;

namespace StardewModdingAPI.Events
{
    /// <summary>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 <see cref="IInputEvents"/> if possible.</summary>
    public interface IGameLoopEvents
    {
        /// <summary>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.</summary>
        event EventHandler<GameLoopLaunchedEventArgs> Launched;

        /// <summary>Raised before the game performs its overall update tick (≈60 times per second).</summary>
        event EventHandler<GameLoopUpdatingEventArgs> Updating;

        /// <summary>Raised after the game performs its overall update tick (≈60 times per second).</summary>
        event EventHandler<GameLoopUpdatedEventArgs> Updated;
    }
}