internal virtual void RegisterKeyInput() { if (keyInputRegistered) { return; } keyType = new HandleKeyType(HandleKeyType); keyPress = new HandleKeyPress(HandleKeyPress); keyRelease = new HandleKeyRelease(HandleKeyRelease); KeyboardInput.Instance.KeyTypeEvent += keyType; KeyboardInput.Instance.KeyPressEvent += keyPress; KeyboardInput.Instance.KeyReleaseEvent += keyRelease; keyInputRegistered = true; }
internal virtual void RegisterKeyInput() { if (keyInputRegistered) return; keyType = new HandleKeyType(HandleKeyType); keyPress = new HandleKeyPress(HandleKeyPress); keyRelease = new HandleKeyRelease(HandleKeyRelease); KeyboardInput.Instance.KeyTypeEvent += keyType; KeyboardInput.Instance.KeyPressEvent += keyPress; KeyboardInput.Instance.KeyReleaseEvent += keyRelease; keyInputRegistered = true; }