2011年12月29日木曜日

タッチイベント

#import "CCTouchDispatcher.h"


[[CCTouchDispatcher sharedDispatcher] addTargetDelegate:self priority:0 swallowsTouches:YES];
self.isTouchEnabled = YES;


-(BOOL)ccTouchBegan:(UITouch *)touch withEvent:(UIEvent *)event{
return YES;
}

-(void)ccTouchEnded:(UItouch *)touch withEvent:(UIEvent *)event{
CGPoint location=[touch locationInView:[touch view]];
CGPoint convertedLocation = [[CCDirector sharedDirector]convertToGL:location];

0 件のコメント:

コメントを投稿