summaryrefslogtreecommitdiff
path: root/src/StardewModdingAPI/Events/MineEvents.cs
blob: 8b91d7d7cbbb1d6e359676dcbd15d9277834dc5b (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
using System;

namespace StardewModdingAPI.Events
{
    /// <summary>Events raised when something happens in the mines.</summary>
    public static class MineEvents
    {
        /*********
        ** Events
        *********/
        /// <summary>Raised after the player warps to a new level of the mine.</summary>
        public static event EventHandler<EventArgsMineLevelChanged> MineLevelChanged;


        /*********
        ** Internal methods
        *********/
        /// <summary>Raise a <see cref="MineLevelChanged"/> event.</summary>
        /// <param name="previousMineLevel">The previous mine level.</param>
        /// <param name="currentMineLevel">The current mine level.</param>
        internal static void InvokeMineLevelChanged(int previousMineLevel, int currentMineLevel)
        {
            MineEvents.MineLevelChanged?.Invoke(null, new EventArgsMineLevelChanged(previousMineLevel, currentMineLevel));
        }
    }
}