【发布时间】:2012-10-11 21:05:54
【问题描述】:
我正在编写一个游戏,当用户触摸屏幕的左侧时,玩家会向左移动,当他们触摸屏幕的右手部分时,玩家会向右移动。
目前播放器仅在您第一次触摸屏幕时移动,我希望只要用户将手指放在屏幕上就可以施加力...我似乎找不到为此的 API 调用。我该怎么办?
- (void)ccTouchesEnded:(NSSet *)touches withEvent:(UIEvent *)event
{
[self handleFrankMove:touches withEvent:event];
}
-(void)ccTouchesMoved:(NSSet *)touches withEvent:(UIEvent *)event{
[self handleFrankMove:touches withEvent:event];
}
-(void)ccTouchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{
[self handleFrankMove:touches withEvent:event];
}
【问题讨论】:
标签: iphone objective-c cocos2d-iphone touch