I was looking up the different abilities of Cocos2d, and don't quite understand what property is being modified here:
id rot = [CCPropertyAction actionWithDuration:2 key:@"rotation" from:0 to:-270];
id rot_back = [rot reverse];
id rot_seq = [CCSequence actions:rot, rot_back, nil];
Specifically, the "rotation" of what sprite? Rotation is a property of CCSprite, but I see no CCSprite here, so I'm very confused.
Furthermore, it seems to have existed in an earlier version of Cocos2d, so what has happened to it?
I've never seen
CCPropertyAction
used... I'll show you how I would do what you exampled.In previous versions of cocos2d the actions were
CCRotateBy
andCCSequence
, they just changed names for the sake of confusion.All cocos2d actions will have
CCAction...
before them to classify them as actions.