ControlHandler.GetAxis C# (CSharp) Method

GetAxis() public static method

public static GetAxis ( string key ) : float
key string
return float
    public static float GetAxis(string key)
    {
        float axis = 0;
        if(key != null && key != "")
        {
            axis = Input.GetAxisRaw(key);
        }
        return axis;
    }