iPhone cocos2d Tips & Tricks
[sprite setTransformAnchor:ccp(0,0)]; //lower left
or
[sprite setAnchorPoint:ccp(0,0)]
Showing posts with label cocos2D. Show all posts
Showing posts with label cocos2D. Show all posts
scene transition
iPhone cocos2d Tips & Tricks
[[Director sharedDirector] replaceScene:[RotoZoomTransition transitionWithDuration:1.0 scene:scene]];
see: cocos2d/Transition.h
[[Director sharedDirector] replaceScene:[RotoZoomTransition transitionWithDuration:1.0 scene:scene]];
see: cocos2d/Transition.h
Labels:
cocos2D,
iphone SDK
fix gradient
iPhone cocos2d Tips & Tricks
[[Director sharedDirector] setPixelFormat:kRGBA8];
[[Director sharedDirector] setPixelFormat:kRGBA8];
Labels:
cocos2D,
iphone SDK
add and run scene object
iPhone cocos2d Tips & Tricks
[[Director sharedDirector] runWithScene:scene];
[[Director sharedDirector] runWithScene:scene];
Labels:
cocos2D,
iphone SDK
attach the window to cocos2d director
iPhone cocos2d Tips & Tricks
[[Director sharedDirector] attachInWindow:window];
[[Director sharedDirector] attachInWindow:window];
Labels:
cocos2D,
iphone SDK
Landscape view
iPhone cocos2d Tips & Tricks
[[Director sharedDirector] setDeviceOrientation:CCDeviceOrientationLandscapeLeft];
or
[[Director sharedDirector] setLandscape: YES];
or
[application setStatusBarOrientation: UIInterfaceOrientationLandscapeRight animated:NO];
[[Director sharedDirector] setDeviceOrientation:CCDeviceOrientationLandscapeLeft];
or
[[Director sharedDirector] setLandscape: YES];
or
[application setStatusBarOrientation: UIInterfaceOrientationLandscapeRight animated:NO];
Labels:
cocos2D,
iphone SDK
Subscribe to:
Posts (Atom)