using UnityEngine;

namespace CMF
{
    //This character movement input class is an example of how to get input from a keyboard to control the character;
    public class CharacterKeyboardInput : CharacterInput
    {
        public string horizontalInputAxis = "Horizontal";
        public string verticalInputAxis = "Vertical";
        public KeyCode jumpKey = KeyCode.Space;

        //If this is enabled, Unity's internal input smoothing is bypassed;
        public bool useInput = true;

        public override float GetHorizontalMovementInput()
        {
            if (useInput)
                return Input.GetAxisRaw(horizontalInputAxis);
            else
                return 0;
        }

        public override float GetVerticalMovementInput()
        {
            if (useInput)
                return Input.GetAxisRaw(verticalInputAxis);
            else
                return 0;
        }

        public override bool IsJumpKeyPressed()
        {
            //return Input.GetKey(jumpKey);
            return false;
        }
    }
}
