On Aug 1, 4:26 am, claudio canepa <[email protected]> wrote:
> On Fri, Jul 31, 2009 at 9:22 AM, jaber <[email protected]> wrote:
>
> > Help
>
>  post some code
The game scrolling system is by moving and scaling the game layer (not
opengl camera as it messes with other cocos2d stuff like Menu, etc):

class Game(Layer):
  is_event_handler = True
  def __init__(self):
    Layer.__init__(self)
    self.hero = Hero()
  def update(self,dt):
    # move the layer based on the hero's position

  def on_mouse_scroll(x,y,dx,dy):
    self.scale += dy*0.25

  def on_mouse_press(x,y,button,modifiers):
    print x-self.x, y-self.y

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"cocos2d discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/cocos-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to