Skip to content

Instantly share code, notes, and snippets.

@fiftytwo
Created June 14, 2015 23:12
Show Gist options
  • Save fiftytwo/8100073c611839c0dd21 to your computer and use it in GitHub Desktop.
Save fiftytwo/8100073c611839c0dd21 to your computer and use it in GitHub Desktop.
-(void) startWithTarget:(CCNode *)aTarget
{
[super startWithTarget:aTarget];
startAngle_ = [self.target rotation];
diffAngle_ = dstAngle_ - startAngle_;
}
-(void) update: (ccTime) t
{
[self.target setRotation: startAngle_ + diffAngle_ * t];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment