sdraw_mods_cvr/ml_amt/Main.cs
2024-09-25 01:53:07 +03:00

33 lines
867 B
C#

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