title: Cocos2d - multiple sprites on parent node not layer
body: <p>I am trying to place a series of sprites on a layer, but since I want to move all of the sprites as a group, I have created a CocosNode, set it to the same size as the screen and position it in the center of the screen, then add the Sprites to that node (lightNode) instead of adding them to the layer. </p>
  
  <p>What I am seeing is that the sprites don't appear in the correct (same?) positions compared to when I place them in a layer and not in the lightNode. </p>
  
  <p>I made a test program to show the problem using the XCode Cocos2d application template "Hello World" - I then replaced the -init() method of the HelloWorld class in HelloWorldScene.m with this code.</p>
  
  <pre><code>-(id) init
  {
      if( (self=[super init] )) 
      {
          // create my parent node that will contain all the related sprites
          lightPane = [[CocosNode alloc] init];
          CGSize paneSize = { 480, 320 };
          [lightPane setContentSize:paneSize]; 
          [lightPane setPosition:ccp(240, 160)];
  
          // add pane to layer     
          [self addChild:lightPane z:0];
  
          // add a series of sprites to demonstrate the problem 
          int y = 40;
          int x;
          for (x=30; x&lt;300; x+=20)
          {
              Sprite *sp = [Sprite spriteWithFile:@"pause.png"];
              [sp setPosition:ccp(x, y)];
  
              NSLog(@"Next sprite at position (%d, %d)", x, y);
  
              [lightPane addChild:sp z:1];
              //[self addChild:sp z:1]; 
              x+= 20;
          }
      }
      return self;
  }
  </code></pre>
  
  <p>This code references a PNG file called "pause.png" - just take any small image about 30x30 pixels in size and place it in this project to run it. </p>
  
  <p>What you will see is that the sprites appear about halfway up the screen, starting in the middle and heading to the right side. </p>
  
  <p>If you comment out the line adding the sprite to lightPane, and un-comment the line below it, and re-run the sample, you will see the sprites (correctly) appear at the coords they should. </p>
  
  <p>This obviously has something to do with the CocosNode I am using as a parent for the sprites. Anyone see what I am doing wrong here??</p>