forked from Pespiri/CameraPlus
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
85 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
using IPA.Loader; | ||
using IPA.Utilities; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Reflection; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace CameraPlus.HarmonyPatches | ||
{ | ||
internal class BeatLeaderReplayerCameraControllerStartPatch | ||
{ | ||
internal static MethodBase TargetMethod() | ||
{ | ||
PluginMetadata beatLeader = PluginManager.GetPluginFromId("BeatLeader"); | ||
if (beatLeader != null) | ||
return beatLeader.Assembly.GetType("BeatLeader.Replayer.ReplayerCameraController").GetMethod("Start", BindingFlags.Instance | BindingFlags.NonPublic); | ||
else | ||
return null; | ||
} | ||
internal static void Prefix() | ||
{ | ||
Plugin.cameraController._isBeatLeaderReplay = true; | ||
Plugin.cameraController.ScreenCamera.enabled = false; | ||
} | ||
} | ||
|
||
internal class BeatLeaderReplayerCameraControllerOnDestroyPatch | ||
{ | ||
internal static MethodBase TargetMethod() | ||
{ | ||
PluginMetadata beatLeader = PluginManager.GetPluginFromId("BeatLeader"); | ||
if (beatLeader != null) | ||
return beatLeader.Assembly.GetType("BeatLeader.Replayer.ReplayerCameraController").GetMethod("OnDestroy", BindingFlags.Instance | BindingFlags.NonPublic); | ||
else | ||
return null; | ||
} | ||
internal static void Prefix() | ||
{ | ||
Plugin.cameraController._isBeatLeaderReplay = false; | ||
Plugin.cameraController.ScreenCamera.enabled = true; | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters