cocos2d/cocos2d-iphone — pull request #522 by Ben-G (2014-01-23 20:40:56+00:00)
Title: Added CCActionMoveToMovingTarget and Tests

Adds the action mentioned in #521. Allows a target to move to a moving node or to a position that is provided by a block.

Optionally allows to provide a block performed on completion.
Optionally allows a node to follow the target position infinitely.

Preview of class interface:

+(id) actionWithSpeed:(CGFloat)speed targetNode:(CCNode *)targetNode;
+(id) actionWithSpeed:(CGFloat)speed targetNode:(CCNode *)targetNode followInfinite:(BOOL)infinite;

+(id) actionWithSpeed:(CGFloat)speed positionUpdateBlock:(PositionUpdateBlock)block;
+(id) actionWithSpeed:(CGFloat)speed positionUpdateBlock:(PositionUpdateBlock)block followInfinite:(BOOL)infinite;

Any suggestions for improvements welcome!