sprite kit - How do you stop a particle effect? (SKEmitterNode) -


i have code in collide statement if collide object particle happens how stop it? goes on forever whereas want happen couple of times per contactetc

skemitternode *emitter =  [nskeyedunarchiver unarchiveobjectwithfile:[[nsbundle mainbundle]     pathforresource:@"ff" oftype:@"sks"]]; emitter.zposition = 0; emitter.particlepositionrange = cgvectormake(0, self.size.height); emitter.position = cgpointmake(self.size.width, self.size.height/2); [self addchild:emitter]; 

when use particle-editor can set maximum number of particles create. it's field below "particle texture".the official description is:

"the maximum number of particles emitter creates on emitter’s lifetime. after number reached, no more particles created emitter. enter 0 remove particle limits."

also see: particle emitter editor guide

of course, should remove emitter-node parent after created maximum number of particles. can done creating action-sequence waits few seconds , removes emitter-node parent [skaction removefromparent].


Comments

Popular posts from this blog

PHPMotion implementation - URL based videos (Hosted on separate location) -

javascript - Using Windows Media Player as video fallback for video tag -

c# - Unity IoC Lifetime per HttpRequest for UserStore -