mirror of
https://github.com/NotAKidoS/NAK_CVR_Mods.git
synced 2025-09-02 22:39:22 +00:00
AvatarScaleMod: renamed folder
This commit is contained in:
parent
a1d73bf156
commit
fd4fe2ea9d
28 changed files with 6 additions and 6 deletions
43
AvatarScaleMod/Input/DebugKeybinds.cs
Normal file
43
AvatarScaleMod/Input/DebugKeybinds.cs
Normal file
|
@ -0,0 +1,43 @@
|
|||
using NAK.AvatarScaleMod.AvatarScaling;
|
||||
using UnityEngine;
|
||||
|
||||
namespace NAK.AvatarScaleMod.InputHandling;
|
||||
|
||||
internal static class DebugKeybinds
|
||||
{
|
||||
private const float Step = 0.1f;
|
||||
|
||||
internal static void DoDebugInput()
|
||||
{
|
||||
if (AvatarScaleManager.Instance == null)
|
||||
return;
|
||||
|
||||
if (Input.GetKeyDown(KeyCode.Equals) || Input.GetKeyDown(KeyCode.KeypadPlus))
|
||||
{
|
||||
AdjustHeight(Step);
|
||||
}
|
||||
else if (Input.GetKeyDown(KeyCode.Minus) || Input.GetKeyDown(KeyCode.KeypadMinus))
|
||||
{
|
||||
AdjustHeight(-Step);
|
||||
}
|
||||
else if (Input.GetKeyDown(KeyCode.Backspace))
|
||||
{
|
||||
ResetHeight();
|
||||
}
|
||||
}
|
||||
|
||||
private static void AdjustHeight(float adjustment)
|
||||
{
|
||||
float currentHeight = AvatarScaleManager.Instance.GetHeight() + adjustment;
|
||||
currentHeight = Mathf.Max(0f, currentHeight);
|
||||
AvatarScaleManager.Instance.SetTargetHeight(currentHeight);
|
||||
|
||||
AvatarScaleMod.Logger.Msg($"[Debug] Setting height: {currentHeight}");
|
||||
}
|
||||
|
||||
private static void ResetHeight()
|
||||
{
|
||||
AvatarScaleManager.Instance.Setting_UniversalScaling = false;
|
||||
AvatarScaleMod.Logger.Msg("[Debug] Resetting height.");
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue