TechbloxModdingAPI/GamecraftModdingAPI/GamecraftModdingAPIPlugin.cs
2019-12-12 21:00:11 -08:00

48 lines
1.3 KiB
C#

using System;
using IllusionPlugin;
using UnityEngine;
using Harmony;
using System.Reflection;
namespace GamecraftModdingAPI
{
// unused by design
public class GamecraftModdingAPIPlugin //: IllusionPlugin.IEnhancedPlugin
{
public static HarmonyInstance harmony { get; protected set; }
public string[] Filter { get; } = new string[] { "Gamecraft" };
public string Name { get; } = "Gamecraft Modding API";
public string Version { get; } = "v0.1.0.A";
public string HarmonyID { get; } = "org.git.exmods.modtainers.gamecraftmoddingapi";
public void OnApplicationQuit()
{
harmony.UnpatchAll(HarmonyID);
Debug.Log(Name + " shutdown complete");
}
public void OnApplicationStart()
{
if (harmony == null)
{
harmony = HarmonyInstance.Create(HarmonyID);
harmony.PatchAll(Assembly.GetExecutingAssembly());
}
Debug.Log(Name + " start & patch complete");
}
public void OnFixedUpdate() { }
public void OnLateUpdate() { }
public void OnLevelWasInitialized(int level) { }
public void OnLevelWasLoaded(int level) { }
public void OnUpdate() { }
}
}