Removed clutter from log

This commit is contained in:
2026-06-22 13:35:32 +02:00
parent e431dab042
commit ca116ac77f
7 changed files with 161 additions and 86 deletions

View File

@@ -5,17 +5,27 @@
using VRC.SDKBase;
using VRC.Udon.Common;
enum InputMethod
{
KeyboardMouse,
Other,
}
public class PlayerInput : SyncedObject
{
public bool active;
private GameManager gameManager;
Direction resultInput;
Direction inputHorizontal;
Direction inputVertical;
float horizontalValue;
float verticalValue;
bool horizontalPriority;
VRCPlayerApi player;
private VRCPlayerApi player;
private InputMethod inputMethod;
private Direction resultInput;
private Direction inputHorizontal;
private Direction inputVertical;
private float horizontalValue;
private float verticalValue;
private bool horizontalPriority;
public void Initialize(GameManager gameManager)
{
@@ -143,11 +153,29 @@
// Debug.Log("Vertical Input Event: " + value + " | Direction: " + direction + " | lastDirection : " + lastDirection);
}
public override void OnInputMethodChanged(VRCInputMethod inputMethod)
{
switch (inputMethod)
{
case VRCInputMethod.Keyboard:
case VRCInputMethod.Mouse:
this.inputMethod = InputMethod.KeyboardMouse;
return;
default:
this.inputMethod = InputMethod.Other;
return;
}
}
private void SetPriority(bool horizontalPriority)
{
if (this.horizontalPriority != horizontalPriority)
{
player.PlayHapticEventInHand(VRC_Pickup.PickupHand.Left, 0.1f, 0.15f, 75);
if (inputMethod != InputMethod.KeyboardMouse)
{
player.PlayHapticEventInHand(VRC_Pickup.PickupHand.Left, 0.1f, 0.15f, 75);
}
this.horizontalPriority = horizontalPriority;
}
}