Minor - V0.1.0 - Add assets and setup the env for android handheld

This commit is contained in:
2026-02-01 23:25:01 +01:00
parent b21f1cf48b
commit 76132c2cbe
241 changed files with 189835 additions and 1350 deletions

View File

@@ -0,0 +1,42 @@
using UnityEngine;
using UnityEngine.InputSystem;
namespace ArcadeVP
{
public class InputManager_ArcadeVP : MonoBehaviour
{
public ArcadeVehicleController arcadeVehicleController;
[HideInInspector] public float horizontal;
[HideInInspector] public float vertical;
[HideInInspector] public float jump;
private PlayerInput _playerInput;
private InputAction _steerAction;
private InputAction _accelAction;
private InputAction _brakeAction;
private void Awake()
{
_playerInput = GetComponent<PlayerInput>();
if (_playerInput == null)
{
Debug.LogError("PlayerInput component not found on the GameObject.");
return;
}
_steerAction = _playerInput.actions["Steer"];
_accelAction = _playerInput.actions["Accelerate"];
_brakeAction = _playerInput.actions["HandBrake"];
}
private void Update()
{
horizontal = _steerAction?.ReadValue<float>() ?? 0f;
vertical = _accelAction?.ReadValue<float>() ?? 0f;
jump = _brakeAction?.ReadValue<float>() ?? 0f;
arcadeVehicleController.ProvideInputs(horizontal, vertical, jump);
}
}
}