@@ -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 += "\n Debug Functions" ;
197+
182198 if ( noClip )
183199 dynamicInfo += "\n NoClip" ;
184200
0 commit comments