mirror of
https://github.com/Gabi-Zar/Toggle-HUD-Silksong-mod.git
synced 2026-04-17 05:46:05 +02:00
Initial commit: add source files and project
This commit is contained in:
29
ToggleHUD/main.cs
Normal file
29
ToggleHUD/main.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
using System.Reflection;
|
||||
using BepInEx;
|
||||
using BepInEx.Logging;
|
||||
using HarmonyLib;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
|
||||
[BepInPlugin("com.gabizar.togglehud", "Toggle HUD Mod", "0.1.0 ")]
|
||||
public class ToggleHUD: BaseUnityPlugin
|
||||
{
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
Logger.LogInfo("Toggle HUD mod loaded and initialized.");
|
||||
|
||||
Harmony.CreateAndPatchAll(typeof(ToggleHUD), null);
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
if (Input.GetKeyDown(KeyCode.F11))
|
||||
{
|
||||
HudGlobalHide.IsHidden = !HudGlobalHide.IsHidden;
|
||||
Logger.LogInfo($"HUD hidden = {HudGlobalHide.IsHidden}");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user