Moar Gamecraft commands!
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

63 рядки
1.5KB

  1. using System;
  2. using IllusionPlugin;
  3. using UnityEngine;
  4. using Harmony;
  5. using System.Reflection;
  6. namespace TestMod
  7. {
  8. public class Plugin : IllusionPlugin.IEnhancedPlugin
  9. {
  10. public static HarmonyInstance harmony { get; protected set; }
  11. public string[] Filter { get; } = new string[] { "RobocraftX", "Gamecraft" };
  12. public string Name { get; } = "TestPlugin";
  13. public string Version { get; } = "v0.0.0a";
  14. public string HarmonyID { get; } = "org.git.exmods.base.testmod.testplugin";
  15. public void OnApplicationQuit()
  16. {
  17. harmony.UnpatchAll(HarmonyID);
  18. Debug.Log("TestPlugin shutdown complete");
  19. }
  20. public void OnApplicationStart()
  21. {
  22. if (harmony == null)
  23. {
  24. harmony = HarmonyInstance.Create(HarmonyID);
  25. harmony.PatchAll(Assembly.GetExecutingAssembly());
  26. }
  27. Debug.Log("TestPlugin start & patch complete");
  28. }
  29. public void OnFixedUpdate()
  30. {
  31. //throw new NotImplementedException();
  32. }
  33. public void OnLateUpdate()
  34. {
  35. //throw new NotImplementedException();
  36. }
  37. public void OnLevelWasInitialized(int level)
  38. {
  39. //throw new NotImplementedException();
  40. }
  41. public void OnLevelWasLoaded(int level)
  42. {
  43. //throw new NotImplementedException();
  44. }
  45. public void OnUpdate()
  46. {
  47. //throw new NotImplementedException();
  48. }
  49. }
  50. }