-
-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
joystick cant be reloaded when change the view #18
Comments
first, there is a bug, when i change the view, the old stuff remains, this is because the line and second, i found two solutions for this problem with two separated joysticks for every modein the html
in the main app in the html
in body
with a separated div for joystickin body
in html, in the funcion show view
|
Sorry @hawkpurpletree, but I don't understand the problem. However if you want to ask a few more questions, you can also use the GitHub Discussions that I have activated and found here [https://github.com/bobboteck/JoyStick/discussions], instead of using the Issues. If you are interested, I recently published the project as an NPM package. To close, I would be very curious to see your finished project, to see how you used the JoyStick, then if you want there is a Wiki page where I have published some projects that use it, and if it is possible for you I would like to add yours too. |
Im using this code to change the view
in the body, the joystick is defined two times
in css i defined the joystick this way
the first time i call showView('ingame_attack'); the joystick works fine
the problem is when i change in the middle of the game to "ingame_defense", the joystick stop moving
im developing an AirConsole game with Unity 2019.4,
for this code, i followed this tutorial
https://franzeus.medium.com/the-airconsole-controller-your-smartphone-is-the-gamepad-588875f944d7#.zfhidyi4j
i tried with a joyDiv2 in the css, body and showview (adding "joy = new JoyStick('joyDiv2');"), but the old joystick remains in the place, and anytime i call showview, a new joystick appear
The text was updated successfully, but these errors were encountered: