internal void OnInputDetected(FFEventParameter args)
	{
		FFEngine.Events.UnregisterForEvent("InputKeyDetected", OnInputDetected);
		isRegistered = false;
		InputKeyBinding newBinding = args.data as InputKeyBinding;
		if(newBinding.key != KeyCode.Escape)
		{
			EInputTriggerType type = binding.trigger;
			binding = newBinding;
			binding.trigger = type;
		}
		UpdateDisplay();
	}
Esempio n. 2
0
    internal void OnInputDetected(FFEventParameter args)
    {
        FFEngine.Events.UnregisterForEvent("InputKeyDetected", OnInputDetected);
        isRegistered = false;
        InputKeyBinding newBinding = args.data as InputKeyBinding;

        if (newBinding.key != KeyCode.Escape)
        {
            EInputTriggerType type = binding.trigger;
            binding         = newBinding;
            binding.trigger = type;
            _inputKey.UpdateBinding(binding);
        }
        UpdateDisplay();
    }
Esempio n. 3
0
    internal void DoUpdate()
    {
        foreach (AInputEvent each in keys.Values)
        {
            each.DoUpdate();
        }
        foreach (AInputAxis each in axis.Values)
        {
            each.DoUpdate();
        }

        if (_isPollingKey)
        {
            InputKeyBinding binding = InputKeyBinding.Current;
            if (binding != null)
            {
                FFEventParameter args = new FFEventParameter();
                args.data = binding;
                FFEngine.Events.FireEvent("InputKeyDetected", args);
                _isPollingKey = false;
            }
        }

        if (_isPollingAxis)
        {
            if (InputKeyBinding.IsEscapePressed())
            {
                FFEngine.Events.FireEvent("InputAxisDetected", null);
            }
            else
            {
                InputControllerAxisBinding binding = InputControllerAxisBinding.Current;
                if (binding != null)
                {
                    FFEventParameter args = new FFEventParameter();
                    args.data = binding;
                    FFEngine.Events.FireEvent("InputAxisDetected", args);
                    _isPollingAxis = false;
                }
            }
        }
    }
Esempio n. 4
0
 internal void UpdateBinding(InputKeyBinding a_newBinding)
 {
     _binding = a_newBinding;
 }
Esempio n. 5
0
 internal InputEventKey(string a_eventKeyName, InputKeyBinding a_binding) : base(a_eventKeyName)
 {
     _binding = a_binding;
 }
Esempio n. 6
0
 internal InputEventKey(EInputEventKey a_eventKey, InputKeyBinding a_binding) : this(a_eventKey.ToString(), a_binding)
 {
 }
Esempio n. 7
0
	internal InputEventKey(string a_eventKeyName, InputKeyBinding a_binding) : base(a_eventKeyName)
	{
		_binding = a_binding;
	}
Esempio n. 8
0
	internal InputEventKey(EInputEventKey a_eventKey, InputKeyBinding a_binding) : this(a_eventKey.ToString(),a_binding)
	{
	}