/// <summary> /// Input.GetKeyUp() /// </summary> /// <param name="eventHandler"></param> public void InputEventHandlerRegister_GetKeyUp(KeyCode keyCode, DInputManagerGetKeyUp eventHandler) { if (eventHandler == null) { return; } if (EventDict_GetKeyUp == null) { return; } if (FlagDict_IsKeyDown != null && !FlagDict_IsKeyDown.ContainsKey(keyCode)) { lock (FlagDict_IsKeyDown) FlagDict_IsKeyDown.Add(keyCode, false); } if (!EventDict_GetKeyUp.ContainsKey(keyCode)) { lock (EventDict_GetKeyUp) EventDict_GetKeyUp.Add(keyCode, eventHandler); } else { lock (EventDict_GetKeyUp) EventDict_GetKeyUp[keyCode] += eventHandler; } }
public void InputEventHandlerUnRegister_GetKeyUp(KeyCode keyCode, DInputManagerGetKeyUp eventHandler) { if (eventHandler == null || EventDict_GetKeyUp == null || EventDict_GetKeyUp.Count <= 0 || !EventDict_GetKeyUp.ContainsKey(keyCode)) { return; } EventDict_GetKeyUp[keyCode] -= eventHandler; }