What is the purpose of a CCAnimation name? I see it used to return a debug description, but I'm not sure what other purpose it serves. As far as I can tell you can't create a CCAnimation without supplying a name, so it must be more important than that.
CCAnimation's name property
(2 posts) (2 voices)-
Posted 2 years ago #
-
it seems to set the name you set to an NSString variable within the object called name_
I can't find any commands to do with the animation where you would use this to reference or call the animation. It is used in the description method, but this is again more of a debugging thing.
EDIT: the reverse action seems to use it
- (CCIntervalAction *) reverse { NSArray *oldArray = [animation_ frames]; NSMutableArray *newArray = [NSMutableArray arrayWithCapacity:[oldArray count]]; NSEnumerator *enumerator = [oldArray reverseObjectEnumerator]; for (id element in enumerator) { [newArray addObject:[[element copy] autorelease]]; } CCAnimation *newAnim = [CCAnimation animationWithName:animation_.name delay:animation_.delay frames:newArray]; return [[self class] actionWithDuration:duration animation:newAnim restoreOriginalFrame:restoreOriginalFrame]; }Maybe riq could shed some light on this?
Posted 2 years ago #
Reply
You must log in to post.