diff options
author | Carl <slxxls92@gmail.com> | 2016-05-30 01:33:37 +0100 |
---|---|---|
committer | Carl <slxxls92@gmail.com> | 2016-05-30 01:33:37 +0100 |
commit | fa666f803398e29a7ffec0707cd6a1ec3571d3e9 (patch) | |
tree | 71099c94fa92196cfb6cdb42a56379e6fdaa4364 /src/StardewModdingAPI/Events/Location.cs | |
parent | 4edee54da20e7655ae24cf1ac2abded5ec1ba2c5 (diff) | |
parent | 1212222e9f59a68a9f167d20bbddd8a4e1a3cf81 (diff) | |
download | SMAPI-fa666f803398e29a7ffec0707cd6a1ec3571d3e9.tar.gz SMAPI-fa666f803398e29a7ffec0707cd6a1ec3571d3e9.tar.bz2 SMAPI-fa666f803398e29a7ffec0707cd6a1ec3571d3e9.zip |
Merge pull request #118 from Gormogon/master
Some Semi-Big Changes
Diffstat (limited to 'src/StardewModdingAPI/Events/Location.cs')
-rw-r--r-- | src/StardewModdingAPI/Events/Location.cs | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/StardewModdingAPI/Events/Location.cs b/src/StardewModdingAPI/Events/Location.cs new file mode 100644 index 00000000..f951ab95 --- /dev/null +++ b/src/StardewModdingAPI/Events/Location.cs @@ -0,0 +1,30 @@ +using System;
+using System.Collections.Generic;
+using Microsoft.Xna.Framework;
+using StardewValley;
+using Object = StardewValley.Object;
+
+namespace StardewModdingAPI.Events
+{
+ public static class LocationEvents
+ {
+ public static event EventHandler<EventArgsGameLocationsChanged> LocationsChanged = delegate { };
+ public static event EventHandler<EventArgsLocationObjectsChanged> LocationObjectsChanged = delegate { };
+ public static event EventHandler<EventArgsCurrentLocationChanged> CurrentLocationChanged = delegate { };
+
+ internal static void InvokeLocationsChanged(List<GameLocation> newLocations)
+ {
+ LocationsChanged.Invoke(null, new EventArgsGameLocationsChanged(newLocations));
+ }
+
+ internal static void InvokeCurrentLocationChanged(GameLocation priorLocation, GameLocation newLocation)
+ {
+ CurrentLocationChanged.Invoke(null, new EventArgsCurrentLocationChanged(priorLocation, newLocation));
+ }
+
+ internal static void InvokeOnNewLocationObject(SerializableDictionary<Vector2, Object> newObjects)
+ {
+ LocationObjectsChanged.Invoke(null, new EventArgsLocationObjectsChanged(newObjects));
+ }
+ }
+}
\ No newline at end of file |