Last active
August 29, 2015 14:08
-
-
Save elkraneo/bb74a66f02fb3493a458 to your computer and use it in GitHub Desktop.
SK Particle Emitter
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (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