/ Published in: Objective C
Expand |
Embed | Plain Text
mySprite = [CCSprite spriteWithFile:@"mySprite.png"]]; ... // change current stage here CCTexture2D *newTexture=[[[CCTexture2D alloc]initWithImage:[UIImage imageNamed:[NSString stringWithFormat:@"stage number %d.png",currentStageNumber]]]autorelease]; [mySprite setTexture:newTexture]; [mySprite setTextureRect:CGRectMake(0,0, newTexture.contentSize.width, newTexture.contentSize.height)];
You need to login to post a comment.
