Skip to content

Commit 6ded4c2

Browse files
committed
add debug functions
1 parent 22730ee commit 6ded4c2

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

Main.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
using System.Threading.Tasks;
66
using MelonLoader;
77
using UnityEngine;
8-
[assembly: MelonInfo(typeof(SuperliminalPracticeMod.Main), "Superliminal Practice Mod", "0.1.0", "Micrologist#2351")]
8+
[assembly: MelonInfo(typeof(SuperliminalPracticeMod.Main), "Superliminal Practice Mod", "0.1.1", "Micrologist#2351")]
99
[assembly: MelonGame("PillowCastle", null)]
1010

1111
namespace SuperliminalPracticeMod

PracticeModManager.cs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ class PracticeModManager : MonoBehaviour
2929
float storeTime;
3030
float teleportTime;
3131
bool unlimitedRenderDistance;
32+
bool debugFunctions;
3233

3334
void Awake()
3435
{
@@ -42,6 +43,9 @@ void Awake()
4243
storedRotation = Quaternion.identity;
4344
storedScale = 1.0f;
4445
storedMap = -1;
46+
GameManager.GM.enableDebugFunctions = true;
47+
debugFunctions = false;
48+
4549
}
4650

4751
void Update()
@@ -54,9 +58,11 @@ void Update()
5458
noClipSpeed = 10.0f;
5559
}
5660

61+
5762
if (GameManager.GM.player == null)
5863
return;
5964

65+
6066
if (player != GameManager.GM.player)
6167
{
6268
player = GameManager.GM.player;
@@ -82,6 +88,7 @@ void Update()
8288
{
8389
playerText = NewPlayerText();
8490
}
91+
GameManager.GM.enableDebugFunctions = debugFunctions;
8592
}
8693

8794

@@ -142,6 +149,12 @@ void Update()
142149

143150
if (Input.GetKeyDown(KeyCode.F8))
144151
RestartMap();
152+
153+
if(Input.GetKeyDown(KeyCode.F9))
154+
{
155+
debugFunctions = !debugFunctions;
156+
GameManager.GM.enableDebugFunctions = debugFunctions;
157+
}
145158
}
146159

147160

@@ -179,6 +192,9 @@ string GetPlayerTextString()
179192
float scale = playerMotor.transform.localScale.x;
180193
string dynamicInfo = "";
181194

195+
if (debugFunctions)
196+
dynamicInfo += "\nDebug Functions";
197+
182198
if (noClip)
183199
dynamicInfo += "\nNoClip";
184200

0 commit comments

Comments
 (0)