50 lines
1.3 KiB
C#
50 lines
1.3 KiB
C#
#if UNITY_EDITOR || DEVELOPMENT_BUILD
|
|
using UnityEngine;
|
|
using UnityEngine.InputSystem;
|
|
using Unheimlich.Features.Diapason;
|
|
|
|
namespace Unheimlich.Dev
|
|
{
|
|
|
|
public class DiapasonEquipmentTester : MonoBehaviour
|
|
{
|
|
[Header("References")]
|
|
[SerializeField] private DiapasonEquipmentManager _equipmentManager;
|
|
|
|
[Header("Input")]
|
|
[SerializeField] private Key _equipKey = Key.E;
|
|
[SerializeField] private Key _unequipKey = Key.R;
|
|
|
|
void Update()
|
|
{
|
|
if (_equipmentManager == null)
|
|
return;
|
|
|
|
if (Keyboard.current[_equipKey].wasPressedThisFrame)
|
|
{
|
|
_equipmentManager.EquipDiapason();
|
|
}
|
|
|
|
if (Keyboard.current[_unequipKey].wasPressedThisFrame)
|
|
{
|
|
_equipmentManager.UnequipDiapason();
|
|
}
|
|
}
|
|
|
|
void OnGUI()
|
|
{
|
|
GUILayout.BeginArea(new Rect(10, 10, 350, 150));
|
|
GUILayout.Label("=== Diapason Equipment System ===");
|
|
GUILayout.Label($"Press {_equipKey} to Equip Diapason");
|
|
GUILayout.Label($"Press {_unequipKey} to Unequip Diapason");
|
|
GUILayout.Label("");
|
|
GUILayout.Label("When equipped:");
|
|
GUILayout.Label("• Move LEFT hand to touch AudioListenable");
|
|
GUILayout.Label("• LEFT CLICK to tap and activate");
|
|
GUILayout.EndArea();
|
|
}
|
|
}
|
|
|
|
}
|
|
#endif
|