Gamecraft-Discord connection. It can send and receive messages in a specific channel.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

47 lines
1.0KB

  1. using System.Reflection;
  2. using Harmony;
  3. using IllusionPlugin;
  4. using UnityEngine;
  5. namespace GCDC
  6. {
  7. public class GCDCPlugin : IPlugin
  8. {
  9. public string Name { get; } = "GCDC";
  10. public string Version { get; } = "v0.0.1";
  11. public static HarmonyInstance harmony { get; protected set; }
  12. public const string HarmonyID = "io.github.norbipeti.GCDC";
  13. public void OnApplicationStart()
  14. {
  15. if (harmony == null)
  16. {
  17. harmony = HarmonyInstance.Create(HarmonyID);
  18. harmony.PatchAll(Assembly.GetExecutingAssembly());
  19. }
  20. Debug.Log("GCDC loaded");
  21. }
  22. public void OnApplicationQuit()
  23. {
  24. harmony?.UnpatchAll(HarmonyID);
  25. }
  26. public void OnLevelWasLoaded(int level)
  27. {
  28. }
  29. public void OnLevelWasInitialized(int level)
  30. {
  31. }
  32. public void OnUpdate()
  33. {
  34. }
  35. public void OnFixedUpdate()
  36. {
  37. }
  38. }
  39. }