示例#1
0
        public static void StartScan(ScanSettings settings, ScanHandler scanHandler)
        {
            if (settings.joystick < 0 || settings.joystick >= AxisConfiguration.MaxJoystickAxes)
            {
                throw new ArgumentException("The joystick id you want to scan for is out of range");
            }

            if (_instance._scanFlags != ScanFlags.None)
            {
                _instance.StopInputScan();
            }

            _instance._scanTimeout      = settings.timeout;
            _instance._scanFlags        = settings.scanFlags;
            _instance._scanStartTime    = _instance.ignoreTimescale ? Time.realtimeSinceStartup : Time.time;
            _instance._cancelScanButton = settings.cancelScanButton;
            _instance._scanJoystick     = settings.joystick;
            _instance._scanUserData     = settings.userData;
            _instance._scanHandler      = scanHandler;
        }
示例#2
0
        public static void StartScan(ScanSettings settings, ScanHandler scanHandler)
        {
            if (settings.joystick < 0 || settings.joystick >= AxisConfiguration.MaxJoystickAxes)
            {
                Debug.LogError("Joystick is out of range. Cannot start scan.");
                return;
            }

            if (_instance._scanFlags != ScanFlags.None)
            {
                _instance.StopInputScan();
            }

            _instance._scanTimeout      = settings.timeout;
            _instance._scanFlags        = settings.scanFlags;
            _instance._scanStartTime    = _instance.ignoreTimescale ? Time.realtimeSinceStartup : Time.time;
            _instance._cancelScanButton = settings.cancelScanButton;
            _instance._scanJoystick     = settings.joystick;
            _instance._scanUserData     = settings.userData;
            _instance._scanHandler      = scanHandler;
        }
        public static void StartScan(ScanSettings settings, ScanHandler scanHandler)
        {
            if (settings.joystick < 0 || settings.joystick >= AxisConfiguration.MaxJoystickAxes)
                throw new ArgumentException ("The joystick id you want to scan for is out of range");

            if (_instance._scanFlags != ScanFlags.None)
                _instance.StopInputScan ();

            _instance._scanTimeout = settings.timeout;
            _instance._scanFlags = settings.scanFlags;
            _instance._scanStartTime = _instance.ignoreTimescale ? Time.realtimeSinceStartup : Time.time;
            _instance._cancelScanButton = settings.cancelScanButton;
            _instance._scanJoystick = settings.joystick;
            _instance._scanUserData = settings.userData;
            _instance._scanHandler = scanHandler;
        }
		public static void StartScan(ScanSettings settings, ScanHandler scanHandler)
		{
			if(settings.joystick < 0 || settings.joystick >= AxisConfiguration.MaxJoystickAxes)
			{
				Debug.LogError("Joystick is out of range. Cannot start scan.");
				return;
			}
			
			if(_instance._scanFlags != ScanFlags.None)
				_instance.StopInputScan();
			
			_instance._scanTimeout = settings.timeout;
			_instance._scanFlags = settings.scanFlags;
			_instance._scanStartTime = _instance.ignoreTimescale ? Time.realtimeSinceStartup : Time.time;
			_instance._cancelScanButton = settings.cancelScanButton;
			_instance._scanJoystick = settings.joystick;
			_instance._scanUserData = settings.userData;
			_instance._scanHandler = scanHandler;
		}