草庐IT

rotateDiff

全部标签

iphone - 如何用cocos2d-iphone 旋转 Sprite 180度?

-(void)ccTouchMoved:(UITouch*)touchwithEvent:(UIEvent*)event{CGPointlocation=[touchlocationInView:[touchview]];location=[[CCDirectorsharedDirector]convertToGL:location];shootVector=ccpSub(location,cannon.position);CGFloatshootAngle=ccpToAngle(shootVector);cocosAngle=CC_RADIANS_TO_DEGREES(-1*shoo