[CVRGizmos] cleanup & new gizmos

This commit is contained in:
NotAKidoS 2023-05-02 12:57:13 -05:00
parent 6f24bd6ff3
commit e512c9dd70
21 changed files with 724 additions and 565 deletions

View file

@ -2,7 +2,7 @@
using MelonLoader;
using System.Collections;
namespace CVRGizmos;
namespace NAK.CVRGizmos;
public class CVRGizmos : MelonMod
{
@ -17,6 +17,8 @@ public class CVRGizmos : MelonMod
public override void OnInitializeMelon()
{
EntryEnabled.OnEntryValueChangedUntyped.Subscribe(CVRGizmosEnabled);
EntryLocalOnly.OnEntryValueChangedUntyped.Subscribe(CVRGizmosLocalOnly);
MelonLoader.MelonCoroutines.Start(WaitForLocalPlayer());
}
@ -28,13 +30,13 @@ public class CVRGizmos : MelonMod
PlayerSetup.Instance.gameObject.AddComponent<CVRGizmoManager>();
}
public void CVRGizmosEnabled()
public void CVRGizmosEnabled(object arg1, object arg2)
{
if (!CVRGizmoManager.Instance) return;
CVRGizmoManager.Instance.EnableGizmos(EntryEnabled.Value);
}
public void CVRGizmosLocalOnly()
public void CVRGizmosLocalOnly(object arg1, object arg2)
{
if (!CVRGizmoManager.Instance) return;
CVRGizmoManager.Instance.g_localOnly = EntryLocalOnly.Value;