Exemple #1
0
        public void DirectionalInput(InputAction.CallbackContext context)
        {
            //Debug.Log(context.ReadValue<Vector2>());
            //Debug.Log(context.phase);

            if (context.performed)
            {
                //Log.Info("DirectionalInput performed");
                _controller.DirectionInput(context.ReadValue <Vector2>());
            }
            else if (context.started)
            {
                //Debug.Log("DirectionalInput started");
                _controller.DirectionInputStart(context.ReadValue <Vector2>());
            }
            else if (context.canceled)
            {
                //Debug.Log("DirectionalInput canceled");
                _controller.DirectionInputCancel(context.ReadValue <Vector2>());
            }
        }