Stardew_Valley_Mods/GeneralMods/MapEvents/EventSystem.cs

36 lines
1.1 KiB
C#
Raw Normal View History

2018-02-24 05:55:51 +08:00
using System;
using EventSystem.Framework;
using StardewModdingAPI;
2018-02-24 05:55:51 +08:00
namespace EventSystem
{
// TODO: Make Bed/Sleep Event.
public class EventSystem : Mod
2018-02-24 05:55:51 +08:00
{
public static IModHelper ModHelper;
public static IMonitor ModMonitor;
public static EventManager eventManager;
/// <summary>The mod entry point, called after the mod is first loaded.</summary>
/// <param name="helper">Provides simplified APIs for writing mods.</param>
2018-02-24 05:55:51 +08:00
public override void Entry(IModHelper helper)
{
ModHelper = this.Helper;
ModMonitor = this.Monitor;
StardewModdingAPI.Events.GameEvents.UpdateTick += this.GameEvents_UpdateTick;
StardewModdingAPI.Events.SaveEvents.AfterLoad += this.SaveEvents_AfterLoad;
2018-02-24 05:55:51 +08:00
}
private void SaveEvents_AfterLoad(object sender, EventArgs e)
{
eventManager = new EventManager();
}
private void GameEvents_UpdateTick(object sender, EventArgs e)
{
eventManager?.update();
2018-02-24 05:55:51 +08:00
}
}
}