public void DoUpdate() { #if !ENABLE_INPUT_SYSTEM || ENABLE_LEGACY_INPUT_MANAGER // without the event-based input system, all keys need to be checked if (!textInputHappening) { Array.ForEach(keyBindGroups, ks => ks.Update()); } else { Array.ForEach(keyBindGroups, ks => ks.Update(IsKeyBindAmbiguousWithTextInput)); } #else _isInterface.Update(); // updates _pressed // the input system collates the keys that have been pressed/released/held. all such logic happens here, in the main thread (?) for (int i = 0; i < _currentKeyEvents.Count; ++i) { HashSet <KCode> keyEvents = _currentKeyEvents[i]; foreach (KCode kCode in keyEvents) { Func <KBind, bool> filter = null; if (textInputHappening) { filter = IsKeyBindAmbiguousWithTextInput; } keyBindGroups[i].Update(kCode, filter); } keyEvents.Clear(); } #endif Array.ForEach(keyBindGroups, ks => ks.Resolve(debugPrintPossibleKeyConflicts, debugPrintActivatedEvents)); for (int i = 0; i < AxisBinds.Count; ++i) { AxisBinds[i].Update(); } ++UpdateCount; keyRepeatRate.Update(); }
void Update() { isInterface.Update(); }