mirror of
https://github.com/hanetzer/sdraw_mods_cvr.git
synced 2025-09-05 03:19:23 +00:00
New mod: PlayerPickUp
This commit is contained in:
parent
e9ed898b9a
commit
fd9809bd62
19 changed files with 793 additions and 23 deletions
38
ml_ppu/Main.cs
Normal file
38
ml_ppu/Main.cs
Normal file
|
@ -0,0 +1,38 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using UnityEngine;
|
||||
|
||||
namespace ml_ppu
|
||||
{
|
||||
public class PlayerPickUp : MelonLoader.MelonMod
|
||||
{
|
||||
PickUpManager m_manager = null;
|
||||
|
||||
public override void OnInitializeMelon()
|
||||
{
|
||||
Settings.Init();
|
||||
GameEvents.Init(HarmonyInstance);
|
||||
ModUi.Init();
|
||||
ModSupport.Init();
|
||||
|
||||
MelonLoader.MelonCoroutines.Start(WaitForRootLogic());
|
||||
}
|
||||
|
||||
IEnumerator WaitForRootLogic()
|
||||
{
|
||||
while(ABI_RC.Core.RootLogic.Instance == null)
|
||||
yield return null;
|
||||
|
||||
m_manager = new GameObject("[PlayerPickUp]").AddComponent<PickUpManager>();
|
||||
}
|
||||
|
||||
public override void OnDeinitializeMelon()
|
||||
{
|
||||
if(m_manager != null)
|
||||
{
|
||||
UnityEngine.Object.Destroy(m_manager.gameObject);
|
||||
m_manager = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue