Touchable CCSprite for cocos2d framework with Objective-C Blocks
Objective-C
Switch branches/tags
Nothing to show
Latest commit 30e925e Dec 26, 2012 @m1entus m1entus - propably fixed issue #3
Permalink
Failed to load latest commit information.
.gitignore Initial commit Nov 8, 2012
CCTouchableSprite.h cocos2d v2 Dec 19, 2012
CCTouchableSprite.m - propably fixed issue #3 Dec 26, 2012
README.md

README.md

CCTouchableSprite

Touchable CCSprite for cocos2d framework with Objective-C Blocks

How to use:

[xButton setTouchBlock:^(CCSprite *sprite) {
            CCAction *actionDown =
            [CCSequence actions:
             [CCEaseIn actionWithAction:[CCMoveTo actionWithDuration:1 position:ccp(0, 0)] rate:3],
             nil];
            
            [credits runAction:actionDown];
        }];

or

[xButton setTouchTarget:self action:@selector(callbackMethod)];