using System; using UnityEditor; using UnityEngine; using UnityEngine.InputSystem; using UnityEngine.UIElements; using NodeCanvas; using NodeCanvas.Framework; using ParadoxNotion; public class PlayerControls : MonoBehaviour{ // References private Player thisPlayer; // TODO: Turn these into accessors public Vector2 rawMoveInput; public Vector2 rawLookInput; public GraphOwner graph; void Awake(){ thisPlayer = GetComponent(); graph = GetComponent(); } public void OnMove(InputValue value){ rawMoveInput.x = value.Get().x; rawMoveInput.y = value.Get().y; } public void OnLook(InputValue value){ rawLookInput.x = value.Get().x; rawLookInput.y = value.Get().y; } public void OnSprint(){ graph.SendEvent("InputEvent", "Sprint", null); } public void OnJump(){ graph.SendEvent("InputEvent", "Jump", null); } public void OnLockOn(){ GetComponent().ChangeLockOnTarget(); } }