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; }
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); }