mirror of
https://github.com/hanetzer/sdraw_mods_cvr.git
synced 2025-09-03 10:29:22 +00:00
33 lines
864 B
C#
33 lines
864 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;
|
|
}
|
|
}
|
|
}
|