Hello,
please help: Within my main class (extension from JFrame) I added a KeyListener. I only set flags within the methods of the KeyListeners.
The flags are checked in my game loop which runs in a different thread.
The problem I have is as following: Let’s say I hold pressed the fire key and my player keeps firing, but if I press an additional key, e.g. to move my player, the firing stops.
Hope this is understandable?
How can I avoid this? I tried to run the KeyListener in it’s own thread but it didn’t work as desired.