... [SimpleAnimObject spriteWithBatchNode:batch1 rect:CGRectMake(0,0 ,48 ,48 )]; [batch1 addChild:bat]; [bat setPosition:ccp(arc4random() %40 0 +40 , arc4random() %15 0 +15 0)]; //Make the bat fly up. Get the ... arc4random() %4 +1; for(int i =1; i< =4; i+ =1) { [animation addFrame:[cache spriteFrameByName:[NSString stringWithFormat:@"simple_bat_0%i.png",num]]]; num++; if(num > 4) { num = 1; ... rect:CGRectMake(0,0, 64, 64) ]; [s setOpacity:255]; [grassBatch2 addChild:s]; [s setPosition:ccp(arc4random()%500-50, arc4random() %40 -10 )]; } /*** Draw colored rectangles using a 1px x 1px white texture...