Chr*_*ris 0 iphone objective-c
我写了一个函数,将一个球添加到一个数组但是当我检查它没有增加的数量时,请有人建议.
NSMutableArray *_otherBalls;
-(void)addBall{
CCSprite *target = [CCSprite spriteWithFile:@"redbouncyball.gif" rect:CGRectMake(0, 0, 27, 40)];
[self addChild:target];
//add to our array
[_otherBalls addObject:target];
NSLog(@"Added ball : %@",[_otherBalls count]);
}
Run Code Online (Sandbox Code Playgroud)
日志出来了
添加球:( null)
| 归档时间: |
|
| 查看次数: |
72 次 |
| 最近记录: |