Skip to content

Instantly share code, notes, and snippets.

@fiftytwo
Last active August 29, 2015 14:23
Show Gist options
  • Save fiftytwo/0093ccbfa3e8057b726e to your computer and use it in GitHub Desktop.
Save fiftytwo/0093ccbfa3e8057b726e to your computer and use it in GitHub Desktop.
- (void)update:(ccTime)t
{
NSAssert([_target isKindOfClass:[CCNode class]], @"Target is not CCNode");
// XXX: shall I add % 360
if (_angleX == _angleY)
[(CCNode *)_target setRotation:_startAngleX + _angleX * t];
else
{
[_target setRotationX:(_startAngleX + _angleX * t)];
[_target setRotationY:(_startAngleY + _angleY * t)];
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment