as the title indicates, i am trying to add a explosion particle emitter to my sprite that would take place in collision method. here is my code.
if ([heroBullet intersectsNode:enemy]) {
NSString *firePath2 = [[NSBundle mainBundle] pathForResource:@"MyParticle2" ofType:@"sks"];
SKEmitterNode *fireEmitter2 = [NSKeyedUnarchiver unarchiveObjectWithFile:firePath2];
fireEmitter2.position = enemy.position;
[enemy addChild:fireEmitter2];
NSLog(@"fire emitter works");
heroBullet.hidden = YES;
enemy.hidden = YES;
continue;
}
i have played around with the position and zPosition a bit, but can't see the explosion. NSLog says that the code gets executed but i can't see the explosion. can someone guide me to what i am doing wrong? and maybe, how to fix it?