/// <summary> /// Input.GetKey() /// </summary> /// <param name="eventHandler"></param> public void InputEventHandlerRegister_GetKey(KeyCode keyCode, DInputManagerGetKey eventHandler) { if (eventHandler == null) { return; } if (EventDict_GetKey == null) { return; } if (!EventDict_GetKey.ContainsKey(keyCode)) { EventDict_GetKey.Add(keyCode, new DInputManagerGetKey(eventHandler)); } else { EventDict_GetKey[keyCode] += eventHandler; } }
public void InputEventHandlerUnRegister_GetKey(KeyCode keyCode, DInputManagerGetKey eventHandler) { if (eventHandler == null || EventDict_GetKey == null || EventDict_GetKey.Count <= 0 || !EventDict_GetKey.ContainsKey(keyCode)) { return; } EventDict_GetKey[keyCode] -= eventHandler; }