void Awake() { controls = new AuroraInput(); controls.Player.Enable(); controls.Player.Select.performed += _ => SelectedOption(); }
// Start is called before the first frame update void Start() { fade_img.color = new Color(0, 0, 0, 0); controls = new AuroraInput(); controls.Player.Enable(); controls.Player.Move.performed += ctx => Move(ctx.ReadValue <Vector2>()); controls.Player.Look.performed += ctx => Rotate(ctx.ReadValue <Vector2>()); controls.Player.Move.canceled += ctx => Move(new Vector2(0, 0)); controls.Player.Look.canceled += ctx => Rotate(new Vector2(0, 0)); }
void Awake() { // Control action map controls = new AuroraInput(); controls.Player.Enable(); Debug.Log("Controls: " + controls); controls.Player.Move.performed += ctx => Move(ctx.ReadValue <Vector2>()); controls.Player.Look.performed += ctx => Rotate(ctx.ReadValue <Vector2>()); controls.Player.Move.canceled += ctx => Move(new Vector2(0, 0)); controls.Player.Look.canceled += ctx => Rotate(new Vector2(0, 0)); camera = GetComponentInChildren <Camera>(); defaultPosition = camera.transform.localPosition; defaultOrientation = camera.transform.localRotation; stateManager = GameObject.Find("State System").GetComponent <StateSystem>(); }