public static void Enable(IList <KBind> KeyBinds) { if (KeyBinds.Count > 0 && !AppInput.HasKeyBind(KeyBinds[0])) { for (int i = 0; i < KeyBinds.Count; ++i) { AppInput.AddListener(KeyBinds[i]); } } }
public static void Disable(IList <KBind> KeyBinds) { if (AppInput.IsQuitting) { return; } if (KeyBinds.Count > 0 && AppInput.HasKeyBind(KeyBinds[0])) { for (int i = 0; i < KeyBinds.Count; ++i) { AppInput.RemoveListener(KeyBinds[i]); } } }
private void OnEnable() { if (keyBinds.Count > 0 && !AppInput.HasKeyBind(keyBinds[0])) { for (int i = 0; i < keyBinds.Count; ++i) { AppInput.AddListener(keyBinds[i]); } } if (axisBinds.Count > 0 && !AppInput.HasAxisBind(axisBinds[0])) { for (int i = 0; i < axisBinds.Count; ++i) { AppInput.AddListener(axisBinds[i]); } } }
private void OnDisable() { if (AppInput.IsQuitting) { return; } if (keyBinds.Count > 0 && AppInput.HasKeyBind(keyBinds[0])) { for (int i = 0; i < keyBinds.Count; ++i) { AppInput.RemoveListener(keyBinds[i]); } } if (axisBinds.Count > 0 && AppInput.HasAxisBind(axisBinds[0])) { for (int i = 0; i < axisBinds.Count; ++i) { AppInput.RemoveListener(axisBinds[i]); } } }