2016-03-23 08:36:04 +08:00
|
|
|
|
using System;
|
2016-03-04 22:05:36 +08:00
|
|
|
|
using System.Collections.Generic;
|
2016-03-23 08:36:04 +08:00
|
|
|
|
using Microsoft.Xna.Framework;
|
|
|
|
|
using StardewValley;
|
|
|
|
|
using Object = StardewValley.Object;
|
2016-03-04 22:05:36 +08:00
|
|
|
|
|
|
|
|
|
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 { };
|
|
|
|
|
|
|
|
|
|
public static void InvokeLocationsChanged(List<GameLocation> newLocations)
|
|
|
|
|
{
|
|
|
|
|
LocationsChanged.Invoke(null, new EventArgsGameLocationsChanged(newLocations));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static void InvokeCurrentLocationChanged(GameLocation priorLocation, GameLocation newLocation)
|
|
|
|
|
{
|
|
|
|
|
CurrentLocationChanged.Invoke(null, new EventArgsCurrentLocationChanged(priorLocation, newLocation));
|
|
|
|
|
}
|
2016-03-27 13:09:09 +08:00
|
|
|
|
|
2016-03-23 08:36:04 +08:00
|
|
|
|
internal static void InvokeOnNewLocationObject(SerializableDictionary<Vector2, Object> newObjects)
|
2016-03-04 22:05:36 +08:00
|
|
|
|
{
|
|
|
|
|
LocationObjectsChanged.Invoke(null, new EventArgsLocationObjectsChanged(newObjects));
|
|
|
|
|
}
|
|
|
|
|
}
|
2016-03-27 13:09:09 +08:00
|
|
|
|
}
|