|
1 2 3 4 5 6 7 8 9 |
-(BOOL)ccScrollWheel:(NSEvent*)theEvent { CGFloat deltaX = [theEvent deltaX], deltaY = [theEvent deltaY], deltaZ = [theEvent deltaZ]; sample_sprite.position = ccp( sample_sprite.position.x, sample_sprite.position.y+deltaY*5);//moving a sprite vertically by scrolling the scrollwheel return TRUE; } |
Incoming search terms:
- mouse position cocos2d-x
Filed under: Cocos2d • iPad • iPhone
Like this post? Subscribe to my RSS feed and get loads more!




Leave a Reply