I am trying to use the addCloud:
method with the number argument on a selector but I am not able to receive a correct output for the image name.
loading image resource: "cloud<__NSCFTimer: 0x170162400>.png"
- (void)level:(float)interval sprite:(NSString *)charSprite
{
if ([charSprite isEqualToString:@"1"]) {
[NSTimer scheduledTimerWithTimeInterval:k1 target:self selector:@selector(addCloud:) userInfo:charSprite repeats:YES];
}
}
- (void)addCloud:(NSString *)nnumber
{
NSString *nvalue = [NSString stringWithFormat:@"cloud%@.png",nnumber];
_cloud = [SKSpriteNode spriteNodeWithImageNamed:nvalue];
[_cloud setScale:0.4];
_cloud.position = CGPointMake(self.frame.size.width + _cloud.size.width/2, actualY);
[self addChild:_cloud];
}