mirror of
https://github.com/NotAKidoS/NAK_CVR_Mods.git
synced 2025-09-02 14:29:25 +00:00
ASTExtension: Fix again cause dumb
This commit is contained in:
parent
43ef8d1e75
commit
458d4b3987
1 changed files with 9 additions and 8 deletions
|
@ -1,4 +1,5 @@
|
||||||
using System.Reflection;
|
using System.Collections;
|
||||||
|
using System.Reflection;
|
||||||
using ABI_RC.Core.InteractionSystem;
|
using ABI_RC.Core.InteractionSystem;
|
||||||
using ABI_RC.Core.Player;
|
using ABI_RC.Core.Player;
|
||||||
using ABI_RC.Core.Savior;
|
using ABI_RC.Core.Savior;
|
||||||
|
@ -95,13 +96,13 @@ public class ASTExtensionMod : MelonMod
|
||||||
|
|
||||||
CVRGameEventSystem.Avatar.OnLocalAvatarLoad.AddListener(OnLocalAvatarLoad);
|
CVRGameEventSystem.Avatar.OnLocalAvatarLoad.AddListener(OnLocalAvatarLoad);
|
||||||
CVRGameEventSystem.Avatar.OnLocalAvatarClear.AddListener(OnLocalAvatarClear);
|
CVRGameEventSystem.Avatar.OnLocalAvatarClear.AddListener(OnLocalAvatarClear);
|
||||||
|
MelonCoroutines.Start(WaitForGestureRecogniser()); // todo: once stable, use initialization game event
|
||||||
|
}
|
||||||
|
|
||||||
HarmonyInstance.Patch( // todo: once exp hit stable, use game event system
|
private IEnumerator WaitForGestureRecogniser()
|
||||||
typeof(CVRGestureRecognizer).GetMethod(nameof(CVRGestureRecognizer.Start),
|
{
|
||||||
BindingFlags.Public | BindingFlags.Instance), // why public
|
yield return new WaitUntil(() => CVRGestureRecognizer.Instance);
|
||||||
postfix: new HarmonyMethod(typeof(ASTExtensionMod).GetMethod(nameof(InitializeScaleGesture),
|
InitializeScaleGesture();
|
||||||
BindingFlags.NonPublic | BindingFlags.Instance))
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion Melon Events
|
#endregion Melon Events
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue