Skip to content

Commit 114e4c9

Browse files
committed
Merge pull request #718 from kalo/CCParticleBatchNode
updated CCParticleBatchNode by replacing tag with name
2 parents d4a48bb + aa4c5fb commit 114e4c9

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

cocos2d/CCParticleBatchNode.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,9 +151,9 @@
151151
*
152152
* @param child Particle System.
153153
* @param z Z Order.
154-
* @param aTag Tag.
154+
* @param name name tag.
155155
*/
156-
-(void) addChild:(CCParticleSystemBase*)child z:(NSInteger)z tag:(NSInteger) aTag;
156+
-(void) addChild:(CCParticleSystemBase*)child z:(NSInteger)z name:(NSString*)name;
157157

158158
/**
159159
* Inserts a particle system to the batch node.

cocos2d/CCParticleBatchNode.m

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ -(void) updateAllAtlasIndexes;
6060
-(void) increaseAtlasCapacityTo:(NSUInteger) quantity;
6161
-(NSUInteger) searchNewPositionInChildrenForZ:(NSInteger)z;
6262
-(void) getCurrentIndex:(NSUInteger*)oldIndex newIndex:(NSUInteger*)newIndex forChild:(CCNode*)child z:(NSInteger)z;
63-
-(NSUInteger) addChildHelper: (CCNode*) child z:(NSInteger)z tag:(NSInteger) aTag;
63+
-(NSUInteger) addChildHelper:(CCNode*)child z:(NSInteger)z name:(NSString*)name;
6464
@end
6565

6666
@implementation CCParticleBatchNode
@@ -156,7 +156,7 @@ -(void) visit
156156
}
157157

158158
// override addChild:
159-
-(void) addChild:(CCParticleSystemBase*)child z:(NSInteger)z tag:(NSInteger) aTag
159+
-(void) addChild:(CCParticleSystemBase*)child z:(NSInteger)z name:(NSString*)name
160160
{
161161
NSAssert( child != nil, @"Argument must be non-nil");
162162
NSAssert( [child isKindOfClass:[CCParticleSystemBase class]], @"CCParticleBatchNode only supports CCQuadParticleSystems as children");
@@ -169,7 +169,7 @@ -(void) addChild:(CCParticleSystemBase*)child z:(NSInteger)z tag:(NSInteger) aTa
169169
NSAssert( _blendFunc.src == child.blendFunc.src && _blendFunc.dst == child.blendFunc.dst, @"Can't add a PaticleSystem that uses a differnt blending function");
170170

171171
//no lazy sorting, so don't call super addChild, call helper instead
172-
NSUInteger pos = [self addChildHelper:child z:z tag:aTag];
172+
NSUInteger pos = [self addChildHelper:child z:z name:name];
173173

174174
//get new atlasIndex
175175
NSUInteger atlasIndex;

0 commit comments

Comments
 (0)