Last active
August 29, 2015 14:23
-
-
Save fiftytwo/0093ccbfa3e8057b726e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (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