cocos2d Joystick
Developed a simple joystick using cocos2d. Feel free to use for your game project.
The current project only use a pad and cap images. You could add a stick!
Sorry the comment in source code is Korean. ^^;;
new line
[DOWNLOAD: TheFirstGood_JoyStick XCode Project File]
new line
Categories: Development, cocos2d cocos2d, game, iPad, iPhone, iPod, joystick, StandardTouchDelegate, touch
The code is based on 71squared’s UIKit version.
Hey There!
Your joystick looks really great! I’m new to iphone game programming, so I have a simple question.
I’m working a 2D top down pokemon style game, and I wanted to use this joystick. How do I wire it to my sprite?
Thank you so much!
1. Update your sprite position inside Moved touch handler.
2. Use schedule with a certain interval. In the method, update the sprite position based on the angle and distance of the joystick head.
Hope it helps.