Skip to content

Instantly share code, notes, and snippets.

@paytonrules
Created October 28, 2009 11:31
Show Gist options
  • Save paytonrules/220429 to your computer and use it in GitHub Desktop.
Save paytonrules/220429 to your computer and use it in GitHub Desktop.
-(void) initializeDirector
{
[producer initializeDirectorWithWindow:window scene:[GameScene scene]];
// before creating any layer, set the landscape mode
// Initialize Director
[[Director sharedDirector] setDeviceOrientation:CCDeviceOrientationLandscapeLeft];
[[Director sharedDirector] setAnimationInterval:1.0/60];
[[Director sharedDirector] setDisplayFPS:YES];
// create an openGL view inside a window
[[Director sharedDirector] attachInView:window];
[[Director sharedDirector] runWithScene: [GameScene scene]];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment