using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.InputSystem; [CreateAssetMenu(fileName = "KeyboardInput", menuName = "PlayerInput/KeyboardInput")] public class KeyboardPlayerInput : PlayerInputReference { public InputActionReference BoostInput; public InputActionReference HorizontalInput; private DeviceDisconnectController deviceDisconnect; public override bool Boost() { Debug.Log($"{BoostInput}:{BoostInput.action}:{BoostInput.action.inProgress}"); return BoostInput.action.inProgress; } public override float Horizontal() { return -HorizontalInput.action.ReadValue().x; } public override void Init() { GameManager.Instance.OnStartGame(); deviceDisconnect = FindObjectOfType(); deviceDisconnect.enabled = false; } }