/Classes/TargetedAction.h
C Header | 27 lines | 10 code | 5 blank | 12 comment | 0 complexity | bf05021330767f33d2b3ab006ce339fe MD5 | raw file
Possible License(s): Apache-2.0
1// 2// TargetedAction.h 3// MouseMadness 4// 5// Created by Karl Stenerud on 09-12-24. 6// 7 8#import "cocos2d.h" 9 10/** Overrides the target of an action so that it always runs on the target 11 * specified at action creation rather than the one specified by runAction. 12 */ 13@interface TargetedAction : CCIntervalAction <NSCopying> 14{ 15 id forcedTarget; 16 CCFiniteTimeAction* action; 17} 18/** This is the target that the action will be forced to run with */ 19@property(readwrite,retain) id forcedTarget; 20 21/** Create an action with the specified action and forced target */ 22+ (id) actionWithTarget:(id) target action:(CCFiniteTimeAction*) action; 23 24/** Init an action with the specified action and forced target */ 25- (id) initWithTarget:(id) target action:(CCFiniteTimeAction*) action; 26 27@end