Skip to content

Instantly share code, notes, and snippets.

@sdabet
Last active December 14, 2015 05:40
Show Gist options
  • Save sdabet/5037123 to your computer and use it in GitHub Desktop.
Save sdabet/5037123 to your computer and use it in GitHub Desktop.
CCMenuItem's SelectedFor category implementation
@implementation CCMenuItem (SelectedFor)
-(void) selectedFor:(ccTime)duration {
if ([self isSelected]) return;
[self selected];
[self runAction: [CCSequence
actionOne: [CCDelayTime actionWithDuration:duration]
two: [CCCallFunc actionWithTarget:self selector:@selector(unselected) ]
]];
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment