title: I have a issue int spritekit game I am making
body: <p>Hi guys I am not getting the physics applied to my images inside my array.
  all I am trying to do is to randomly pick a bunch of images to pop up on the scene at random locations and what I did was declare them first as SKSpriteNode, gave them their sprites and then used their physics and then their identifier "iamge1...6" in the array. the only reason I am doing this is because I need to have several different sprites or enemies I should say to pop up in the scene but I need to be able to shoot them right and I would need physics applied for that. so am I following a right approach here?</p>
  
  <p>My Code:</p>
  
  <pre><code>- (void) itemsONScene {
  image1 = [SKSpriteNode spriteNodeWithImageNamed:@"b1"];
  image2 = [SKSpriteNode spriteNodeWithImageNamed:@"b2"];
  image3 = [SKSpriteNode spriteNodeWithImageNamed:@"b3"];
  image4 = [SKSpriteNode spriteNodeWithImageNamed:@"b4"];
  image5 = [SKSpriteNode spriteNodeWithImageNamed:@"b5"];
  image6 = [SKSpriteNode spriteNodeWithImageNamed:@"b6"];
  image7 = [SKSpriteNode spriteNodeWithImageNamed:@"b7"];
  
  image1.physicsBody = [SKPhysicsBody bodyWithCircleOfRadius:image1.frame.size.width/2];
  image1.physicsBody.usesPreciseCollisionDetection = YES;
  image1.physicsBody.dynamic = YES;
  image1.physicsBody.categoryBitMask = CNPhysicsimage1Category;
  image1.physicsBody.contactTestBitMask = CNPhysicsbulletCategory;
  [image1 attachDebugRectWithSize:image1.size];
  //////
  image2.physicsBody = [SKPhysicsBody bodyWithCircleOfRadius:image2.frame.size.width/2];
  image2.physicsBody.usesPreciseCollisionDetection = YES;
  image2.physicsBody.dynamic = YES;
  image2.physicsBody.categoryBitMask = CNPhysicsimage2Category;
  image2.physicsBody.contactTestBitMask = CNPhysicsbulletCategory;
  [image2 attachDebugRectWithSize:image2.size];
  //////
  image3.physicsBody = [SKPhysicsBody bodyWithCircleOfRadius:image3.frame.size.width/2];
  image3.physicsBody.usesPreciseCollisionDetection = YES;
  image3.physicsBody.dynamic = YES;
  image3.physicsBody.categoryBitMask = CNPhysicsimage3Category;
  image3.physicsBody.contactTestBitMask = CNPhysicsbulletCategory;
  [image3 attachDebugRectWithSize:image3.size];
  //////
  image4.physicsBody = [SKPhysicsBody bodyWithCircleOfRadius:image4.frame.size.width/2];
  image4.physicsBody.usesPreciseCollisionDetection = YES;
  image4.physicsBody.dynamic = YES;
  image4.physicsBody.categoryBitMask = CNPhysicsimage4Category;
  image4.physicsBody.contactTestBitMask = CNPhysicsbulletCategory;
  [image4 attachDebugRectWithSize:image4.size];
  //////
  image5.physicsBody = [SKPhysicsBody bodyWithCircleOfRadius:image5.frame.size.width/2];
  image5.physicsBody.usesPreciseCollisionDetection = YES;
  image5.physicsBody.dynamic = YES;
  image5.physicsBody.categoryBitMask = CNPhysicsimage5Category;
  image5.physicsBody.contactTestBitMask = CNPhysicsbulletCategory;
  [image5 attachDebugRectWithSize:image5.size];
  /////
  image6.physicsBody = [SKPhysicsBody bodyWithCircleOfRadius:image6.frame.size.width/2];
  image6.physicsBody.usesPreciseCollisionDetection = YES;
  image6.physicsBody.dynamic = YES;
  image6.physicsBody.categoryBitMask = CNPhysicsimage6Category;
  image6.physicsBody.contactTestBitMask = CNPhysicsbulletCategory;
  [image6 attachDebugRectWithSize:image6.size];
  /////
  image7.physicsBody = [SKPhysicsBody bodyWithCircleOfRadius:image7.frame.size.width/2];
  image7.physicsBody.usesPreciseCollisionDetection = YES;
  image7.physicsBody.dynamic = YES;
  image7.physicsBody.categoryBitMask = CNPhysicsimage7Category;
  image7.physicsBody.contactTestBitMask = CNPhysicsbulletCategory;
  [image7 attachDebugRectWithSize:image7.size];
  /////
  myArray = [[NSMutableArray alloc] initWithObjects:@"b1", @"b2", @"b3", @"b4", @"b5", 
  @"b6", @"b7", nil];
  NSUInteger arraypicker = arc4random() % [myArray count];
  NSUInteger i = arraypicker;
  ds = [myArray objectAtIndex:i];
  sprites = [SKSpriteNode spriteNodeWithImageNamed:ds];
  sprites.name = @"items";
  sprites.position = CGPointMake(ScalarRandomRange(325, 525),   
  ScalarRandomRange(self.size.height/1.20, self.size.height/12));
  sprites.xScale = 0.79;
  sprites.yScale = 0.79;
  [self addChild:sprites];
  }
  - (void) OneItemONLY {
       SKAction *appear = [SKAction scaleTo:0.79 duration:0.05];
       SKAction *waiter = [SKAction waitForDuration:2.5];
       SKAction *scaleDown = [SKAction scaleTo:0.0 duration:2.0];
       SKAction *remover = [SKAction removeFromParent];
       [sprites runAction:[SKAction sequence:@[appear, waiter, scaleDown, remover]]];
       [sprites runAction:appear];
   }
  </code></pre>