Last active
December 14, 2015 05:40
-
-
Save sdabet/5037123 to your computer and use it in GitHub Desktop.
CCMenuItem's SelectedFor category implementation
This file contains hidden or 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
@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