sdraw_mods_cvr/ml_pam/Main.cs
2025-08-27 15:14:08 +03:00

37 lines
1,012 B
C#

using UnityEngine;
namespace ml_pam
{
public class PickupArmMovement : MelonLoader.MelonMod
{
ArmMover m_mover = null;
public override void OnInitializeMelon()
{
GameEvents.Init(HarmonyInstance);
}
public override void OnLateInitializeMelon()
{
Settings.Init();
MelonLoader.MelonCoroutines.Start(WaitForRootLogic());
}
System.Collections.IEnumerator WaitForRootLogic()
{
while(ABI_RC.Core.RootLogic.Instance == null)
yield return null;
while(ABI_RC.Core.Player.PlayerSetup.Instance == null)
yield return null;
m_mover = new GameObject("[PickupArmMovement]").AddComponent<ArmMover>();
}
public override void OnDeinitializeMelon()
{
if(m_mover != null)
Object.Destroy(m_mover.gameObject);
m_mover = null;
}
}
}