diff options
author | Jesse Plamondon-Willard <github@jplamondonw.com> | 2017-10-07 23:07:10 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <github@jplamondonw.com> | 2017-10-07 23:07:10 -0400 |
commit | 929dccb75a1405737975d76648e015a3e7c00177 (patch) | |
tree | 659fe16509327e694555db363caf7f47f326443b /src/StardewModdingAPI/Events/LocationEvents.cs | |
parent | 926894f8f52c2a5cf104fcac2f7f34b637f7b531 (diff) | |
download | SMAPI-929dccb75a1405737975d76648e015a3e7c00177.tar.gz SMAPI-929dccb75a1405737975d76648e015a3e7c00177.tar.bz2 SMAPI-929dccb75a1405737975d76648e015a3e7c00177.zip |
reorganise repo structure
Diffstat (limited to 'src/StardewModdingAPI/Events/LocationEvents.cs')
-rw-r--r-- | src/StardewModdingAPI/Events/LocationEvents.cs | 54 |
1 files changed, 0 insertions, 54 deletions
diff --git a/src/StardewModdingAPI/Events/LocationEvents.cs b/src/StardewModdingAPI/Events/LocationEvents.cs deleted file mode 100644 index b834bc1c..00000000 --- a/src/StardewModdingAPI/Events/LocationEvents.cs +++ /dev/null @@ -1,54 +0,0 @@ -using System; -using System.Collections.Generic; -using Microsoft.Xna.Framework; -using StardewModdingAPI.Framework; -using StardewValley; -using Object = StardewValley.Object; - -namespace StardewModdingAPI.Events -{ - /// <summary>Events raised when the player transitions between game locations, a location is added or removed, or the objects in the current location change.</summary> - public static class LocationEvents - { - /********* - ** Events - *********/ - /// <summary>Raised after the player warps to a new location.</summary> - public static event EventHandler<EventArgsCurrentLocationChanged> CurrentLocationChanged; - - /// <summary>Raised after a game location is added or removed.</summary> - public static event EventHandler<EventArgsGameLocationsChanged> LocationsChanged; - - /// <summary>Raised after the list of objects in the current location changes (e.g. an object is added or removed).</summary> - public static event EventHandler<EventArgsLocationObjectsChanged> LocationObjectsChanged; - - - /********* - ** Internal methods - *********/ - /// <summary>Raise a <see cref="CurrentLocationChanged"/> event.</summary> - /// <param name="monitor">Encapsulates monitoring and logging.</param> - /// <param name="priorLocation">The player's previous location.</param> - /// <param name="newLocation">The player's current location.</param> - internal static void InvokeCurrentLocationChanged(IMonitor monitor, GameLocation priorLocation, GameLocation newLocation) - { - monitor.SafelyRaiseGenericEvent($"{nameof(LocationEvents)}.{nameof(LocationEvents.CurrentLocationChanged)}", LocationEvents.CurrentLocationChanged?.GetInvocationList(), null, new EventArgsCurrentLocationChanged(priorLocation, newLocation)); - } - - /// <summary>Raise a <see cref="LocationsChanged"/> event.</summary> - /// <param name="monitor">Encapsulates monitoring and logging.</param> - /// <param name="newLocations">The current list of game locations.</param> - internal static void InvokeLocationsChanged(IMonitor monitor, List<GameLocation> newLocations) - { - monitor.SafelyRaiseGenericEvent($"{nameof(LocationEvents)}.{nameof(LocationEvents.LocationsChanged)}", LocationEvents.LocationsChanged?.GetInvocationList(), null, new EventArgsGameLocationsChanged(newLocations)); - } - - /// <summary>Raise a <see cref="LocationObjectsChanged"/> event.</summary> - /// <param name="monitor">Encapsulates monitoring and logging.</param> - /// <param name="newObjects">The current list of objects in the current location.</param> - internal static void InvokeOnNewLocationObject(IMonitor monitor, SerializableDictionary<Vector2, Object> newObjects) - { - monitor.SafelyRaiseGenericEvent($"{nameof(LocationEvents)}.{nameof(LocationEvents.LocationObjectsChanged)}", LocationEvents.LocationObjectsChanged?.GetInvocationList(), null, new EventArgsLocationObjectsChanged(newObjects)); - } - } -} |