Skip to content

Instantly share code, notes, and snippets.

@elkraneo
Last active August 29, 2015 14:08
Show Gist options
  • Save elkraneo/bb74a66f02fb3493a458 to your computer and use it in GitHub Desktop.
Save elkraneo/bb74a66f02fb3493a458 to your computer and use it in GitHub Desktop.
SK Particle Emitter
- (void)emitParticle:(SKScene *)whichScene {
NSString *emitterPath = [[NSBundle mainBundle] pathForResource:@"YourParticleFileName" ofType:@"sks"];
SKEmitterNode *particle = [NSKeyedUnarchiver unarchiveObjectWithFile:emitterPath];
particle.position = self.position;
particle.name = @"particleName";
particle.targetNode = self.scene;
[yourScene addChild:particle];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment