|
- using System;
- using IllusionPlugin;
- using UnityEngine;
- using Harmony;
- using System.Reflection;
-
- namespace TestMod
- {
- public class Plugin : IllusionPlugin.IEnhancedPlugin
- {
- public static HarmonyInstance harmony { get; protected set; }
-
- public string[] Filter { get; } = new string[] { "RobocraftX", "Gamecraft" };
-
- public string Name { get; } = "TestPlugin";
-
- public string Version { get; } = "v0.0.0a";
-
- public string HarmonyID { get; } = "org.git.exmods.base.testmod.testplugin";
-
- public void OnApplicationQuit()
- {
- harmony.UnpatchAll(HarmonyID);
- Debug.Log("TestPlugin shutdown complete");
- }
-
- public void OnApplicationStart()
- {
- if (harmony == null)
- {
- harmony = HarmonyInstance.Create(HarmonyID);
- harmony.PatchAll(Assembly.GetExecutingAssembly());
- }
- Debug.Log("TestPlugin start & patch complete");
- }
-
- public void OnFixedUpdate()
- {
- //throw new NotImplementedException();
- }
-
- public void OnLateUpdate()
- {
- //throw new NotImplementedException();
- }
-
- public void OnLevelWasInitialized(int level)
- {
- //throw new NotImplementedException();
- }
-
- public void OnLevelWasLoaded(int level)
- {
- //throw new NotImplementedException();
- }
-
- public void OnUpdate()
- {
- //throw new NotImplementedException();
- }
- }
- }
|