cocos2d

iPhone: cocos2d: Fix flicker at start up

Tuesday, September 15th, 2009

Put this code right before you run you first scene ( Assuming that you have “Default.png” file ):

// prevent flicker
Sprite *sprite = [[Sprite spriteWithFile:@"Default.png"] retain];
sprite.anchorPoint = CGPointZero;
[sprite draw];
[[[Director sharedDirector] openGLView] swapBuffers];
[sprite release];

// Run the intro Scene
[[Director sharedDirector] runWithScene: introScene];

iPhone: cocos2d: How to change Label text color

Wednesday, July 29th, 2009

Here’s a fun and easy way :)

my_label = [[Label labelWithString:str fontName:@"Helvetica" fontSize:24.0] retain] ;
[ my_label  setRGB:0 :0 :0 ] ;