예제 #1
0
    public InputScanSetting(InputScanType t, InputBindingBase bindings)
    {
        ScanType     = t;
        InputBinding = bindings;

        CurJoystickButton = JoystickButton.None;
        CurKeyCode        = KeyCode.None;

        CurJoystickIndex = -1;
        CurJoystickAxis  = -1;

        CurMouseAxis = -1;

        IsPositive = true;
        IsInvert   = false;
    }
예제 #2
0
    public bool Start(InputScanSetting setting, InputScanHandler handler, float timeout, KeyCode cancel, KeyCode clear)
    {
        if (IsScanning)
        {
            ForceStop();
        }

        m_curScaningSetting = setting;
        m_scanningType      = setting.ScanType;

        m_leftTime      = timeout;
        m_cancelScanKey = cancel;
        m_clearScanKey  = clear;
        m_scanHandler   = handler;

        IsScanning = true;

        axesToValueMap.Clear();

        return(true);
    }