Touchable CCSprite for cocos2d framework with Objective-C Blocks
Objective-C
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
.gitignore
CCTouchableSprite.h
CCTouchableSprite.m
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)];