using System; using System.Collections; using System.Collections.Generic; using System.Linq; using UnityEngine; public class PlayerInputHandler : MonoBehaviour { [SerializeField] private PlayerInputReference _playerInput; [SerializeField] private List _inputs = new List(); public bool Boost => _inputs.Any(i => i.Boost()); public float Horizontal => _inputs.Select(i=>i.Horizontal()).Sum(); private void Awake() { Init(); } private void Init() { foreach (var input in _inputs) input.Init(); } }