Shouldn’t the reverse on Targeted Action just call reverse on the action instead of clone?
Current implementation is like
TargetedAction* TargetedAction::reverse(void) const
// no reverse for this action, just clone it
How about the following.
TargetedAction* TargetedAction::reverse() const
auto a = new TargetedAction();
Not having proper reverse method on TargetedActions make it difficult to use in complex runAction sequences. Simple example in JSB
var rotate = cc.Sequence.create(
cc.TargetedAction.create(spriteA, cc.RotateBy.create(2, 180)),
cc.TargetedAction.create(spriteB, cc.RotateBy.create(2, 180))
var action = cc.Sequence.create(rotate, rotate.reverse());