-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTrinityMod.cs
More file actions
40 lines (34 loc) · 1.14 KB
/
TrinityMod.cs
File metadata and controls
40 lines (34 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
using MelonLoader;
using UnityEngine;
[assembly: MelonInfo(typeof(Trinity.TrinityMod), "Trinity Menu", "0.4.0", "github.com/k0nnect")]
[assembly: MelonGame("MDickie", "Infinite Lives")]
namespace Trinity
{
public class TrinityMod : MelonMod
{
private static GameObject _menuObject;
public override void OnInitializeMelon()
{
LoggerInstance.Msg("Trinity Menu v0.4.0 initializing...");
}
public override void OnSceneWasLoaded(int buildIndex, string sceneName)
{
LoggerInstance.Msg($"Scene loaded: {sceneName}");
if (_menuObject == null)
{
_menuObject = new GameObject("TrinityMenu");
_menuObject.AddComponent<TrinityMenu>();
Object.DontDestroyOnLoad(_menuObject);
LoggerInstance.Msg("Trinity Menu created! Press INSERT or F1 to open.");
}
}
public override void OnDeinitializeMelon()
{
if (_menuObject != null)
{
Object.Destroy(_menuObject);
_menuObject = null;
}
}
}
}