File tree Expand file tree Collapse file tree 2 files changed +34
-2
lines changed Expand file tree Collapse file tree 2 files changed +34
-2
lines changed Original file line number Diff line number Diff line change 5252
5353 id action = [CCActionRemove action];
5454 */
55- @interface CCActionRemove : CCActionInstant
55+ @interface CCActionRemove : CCActionInstant {
56+ BOOL _cleanUp;
57+ }
58+
59+ +(id )action ;
60+ +(id )actionWithCleanUp : (BOOL )cleanup ;
5661
5762@end
5863
Original file line number Diff line number Diff line change @@ -81,8 +81,35 @@ -(CCActionFiniteTime*) reverse
8181
8282@implementation CCActionRemove
8383
84+ +(id )action {
85+ return [[self alloc ] init ];
86+ }
87+
88+ +(id )actionWithCleanUp : (BOOL )cleanup {
89+ return [[self alloc ] initWithCleanUp: cleanup];
90+ }
91+
92+ -(id )init {
93+ self = [super init ];
94+ if (!self) return nil ;
95+
96+ _cleanUp = true ;
97+
98+ return self;
99+ }
100+
101+ -(id )initWithCleanUp : (BOOL )cleanUp {
102+ self = [super init ];
103+ if (!self) return nil ;
104+
105+ _cleanUp = cleanUp;
106+
107+ return self;
108+ }
109+
110+
84111-(void ) update : (CCTime)time {
85- [(CCNode *)_target removeFromParent ];
112+ [(CCNode *)_target removeFromParentAndCleanup: _cleanUp ];
86113}
87114@end
88115
You can’t perform that action at this time.
0 commit comments