You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello!
I am working on a game where there is a hero. The hero can jump with swipe up on the stage and he can fire with tap on the stage. Things get a little wonky and weird when I try and do some rapid fire and quick jumping. How can I optimize this to work better? Should be adding eventListeners with separate methods?
@BeauKelsey dude I wish I could help you, but your problem description is "a little wonky and weird"... add some logs, analyze what is unexpected-undesired.
How Can I optimize my gestures so that firing(tap) and jumping(swipe) are happening seamlessly.
Is it best practices to fire the same method for both gestures and use if statements to decide which gesture it is? To put it another way... I only have a fraction of a second to figure out if it's a tap or a swipe.
Is my example above the best way to do that?
@BeauKelsey first thing I'd recommend you is to understand why each fails. Add some extra logging (get the stack trace) when state is changing to FAILED.
There's absolutely no connection between your event handlers and "fraction of a second" thing.. I don't even get it, why do you have that question arisen?
Hello!
I am working on a game where there is a hero. The hero can jump with swipe up on the stage and he can fire with tap on the stage. Things get a little wonky and weird when I try and do some rapid fire and quick jumping. How can I optimize this to work better? Should be adding eventListeners with separate methods?
Here the code... any help MUCH appreciated.
The text was updated successfully, but these errors were encountered: