コード例 #1
0
 public override void Dispose()
 {
     if (mousePatched)
     {
         mousePatched = false;
         System.Diagnostics.Debug.WriteLine("MouseSwapper: Unpatching methods");
         HarmonyPatcher.Unpatch();
     }
 }
コード例 #2
0
 public override void Start(ICoreAPI api)
 {
     if (!mousePatched)
     {
         mousePatched = true;
         System.Diagnostics.Debug.WriteLine("MouseSwapper: Patching methods");
         HarmonyPatcher.Patch();
     }
 }