summaryrefslogtreecommitdiff
path: root/src/StardewModdingAPI/Events/EventArgsLevelUp.cs
blob: fe6696d4a27e025e7cdd077d5583ab04279715e8 (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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
using System;

namespace StardewModdingAPI.Events
{
    /// <summary>Event arguments for a <see cref="PlayerEvents.LeveledUp"/> event.</summary>
    public class EventArgsLevelUp : EventArgs
    {
        /*********
        ** Accessors
        *********/
        /// <summary>The player skill that leveled up.</summary>
        public LevelType Type { get; }

        /// <summary>The new skill level.</summary>
        public int NewLevel { get; }

        /// <summary>The player skill types.</summary>
        public enum LevelType
        {
            /// <summary>The combat skill.</summary>
            Combat,

            /// <summary>The farming skill.</summary>
            Farming,

            /// <summary>The fishing skill.</summary>
            Fishing,

            /// <summary>The foraging skill.</summary>
            Foraging,

            /// <summary>The mining skill.</summary>
            Mining,

            /// <summary>The luck skill.</summary>
            Luck
        }


        /*********
        ** Public methods
        *********/
        /// <summary>Construct an instance.</summary>
        /// <param name="type">The player skill that leveled up.</param>
        /// <param name="newLevel">The new skill level.</param>
        public EventArgsLevelUp(LevelType type, int newLevel)
        {
            this.Type = type;
            this.NewLevel = newLevel;
        }
    }
}