想要改进这个问题吗? 更新问题,使其只关注一个问题
Closed 10 years ago.
enemyBlobArray = [[NSMutableArray alloc] init];
for(int i = 0; i < kEnemyCount; i++) {
[enemyArray addObject:[SpriteHelpers setupAnimatedSprite:self.view numFrames:3 withFilePrefix:@"greenbox" withDuration:((CGFloat)(arc4random()%2)/3 + 0.5) ofType:@"png" withValue:0]];
}
enemyView = [enemyArray objectAtIndex:0];
I am trying to make objects appear on screen from this array.
I get an error message saying that the object I add cannot be nil
. I don t know why it s nil
, though.