summaryrefslogtreecommitdiff
path: root/src/SMAPI/Events/WarpedEventArgs.cs
blob: cb7ff204fd7e2cc81ca562cd89293654b0b4fb93 (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
using System;
using StardewValley;

namespace StardewModdingAPI.Events
{
    /// <summary>Event arguments for an <see cref="IPlayerEvents.Warped"/> event.</summary>
    public class WarpedEventArgs : EventArgs
    {
        /*********
        ** Accessors
        *********/
        /// <summary>The player who warped to a new location.</summary>
        public Farmer Player { get; }

        /// <summary>The player's previous location.</summary>
        public GameLocation OldLocation { get; }

        /// <summary>The player's current location.</summary>
        public GameLocation NewLocation { get; }



        /*********
        ** Public methods
        *********/
        /// <summary>Construct an instance.</summary>
        /// <param name="player">The player who warped to a new location.</param>
        /// <param name="oldLocation">The player's previous location.</param>
        /// <param name="newLocation">The player's current location.</param>
        internal WarpedEventArgs(Farmer player, GameLocation oldLocation, GameLocation newLocation)
        {
            this.Player = player;
            this.NewLocation = newLocation;
            this.OldLocation = oldLocation;
        }
    }
}