HUD layer for Sneaky Input Joystick (cocos2d iPhone)

Discussion in 'Public Game Developers Forum' started by Joethemonkey101, Sep 10, 2011.

  1. Joethemonkey101

    Oct 23, 2010
    7
    0
    0
    I'm using the SneakyInput Joystick to move my sprite, and TMX maps for my game. I added auto-camera-movement to my app, so the hero sprite is always visible. When I go through my map, the joystick goes off the screen (it stays where it's original position is). I made a HUD so that the joystick is always at the same position, and doesn't move along with the map. The joystick shows up on screen fine, but when I drag it it doesn't move my hero.

    I've made the HUDLayer a CCLayer in GameLayer, which is where I'm making the moveHero method. I know the problem is that I do [self setCenter....blah blah blah]; instead of only setting Level1 as the center. How do I only move the camera for Level1, and not HUDLayer?

    http://codeviewer.org/view/code:1e54
     

Share This Page