title: curios about CCSpriteBatchNode's addchild method
body: <p>when diving into "learn cocos2d game development with ios5", in ch08</p>
  
  <p>in <code>EnemyCache.m</code></p>
  
  <pre><code>-(id) init
  {
      if ((self = [super init]))
      {
          // get any image from the Texture Atlas we're using
          CCSpriteFrame* frame = [[CCSpriteFrameCache sharedSpriteFrameCache] spriteFrameByName:@"monster-a.png"];
          batch = [CCSpriteBatchNode batchNodeWithTexture:frame.texture];
          [self addChild:batch];
  
          [self initEnemies];
          [self scheduleUpdate];
      }
  
      return self;
  }
  </code></pre>
  
  <p>so batch is with texture "monster-a.png"</p>
  
  <p>in <code>EnemyEntity.m</code>'s <code>initWithType</code> method</p>
  
  <pre><code>switch (type)
  {
      case EnemyTypeUFO:
          enemyFrameName = @"monster-a.png";
          bulletFrameName = @"shot-a.png";
          break;
      case EnemyTypeCruiser:
          enemyFrameName = @"monster-b.png";
          bulletFrameName = @"shot-b.png";
          shootFrequency = 1.0f;
          initialHitPoints = 3;
          break;
      case EnemyTypeBoss:
          enemyFrameName = @"monster-c.png";
          bulletFrameName = @"shot-c.png";
          shootFrequency = 2.0f;
          initialHitPoints = 15;
          break;
  
      default:
          [NSException exceptionWithName:@"EnemyEntity Exception" reason:@"unhandled enemy type" userInfo:nil];
  }
  
  if ((self = [super initWithSpriteFrameName:enemyFrameName]))
  {
      //...
  }
  </code></pre>
  
  <p>so the returned object may be in 3 different frame. since <a href="http://www.cocos2d-iphone.org/api-ref/0.99.5/interface_c_c_sprite_batch_node.html" rel="nofollow">Only the CCSprites that are contained in that texture can be added to the CCSpriteBatchNode</a>, obviously, 'monster-b.png' is not contained in 'monster-a.png', why the different enemy can still be added to the batch?</p>