2011. 3. 27. 22:39 cocos2d
cocos2d : Layer 터치 이벤트 처리
1. 헤더 등록
#import "CCTouchDispatcher.h"
- (void) registerWithTouchDispatcher {
[[CCTouchDispatcher sharedDispatcher] addTargetedDelegate:self priority:0 swallowsTouches:YES];
}
3. 터치 구현
- (BOOL) ccTouchBegan:(UITouch *) touch withEvent:(UIEvent *) event {
return YES;
}
- (void) ccTouchEnded:(UITouch *) touch withEvent:(UIEvent *) event {
}