//设置导演对象
if (![CCDirector setDirectorType:CCDirectorTypeDisplayLink]) {
//如果设置强导演不成功,设置弱一点的
[CCDirector setDirectorType:CCDirectorTypeDefault];
}
//取得导演对象
CCDirector *director = [CCDirector sharedDirector];
[director setAnimationInterval:1.0/60];
[director setDisplayFPS:NO];
//设置舞台
EAGLView *view = [EAGLView viewWithFrame:self.window.frame];
[controller setView:view];
//关联导演和舞台
[director setOpenGLView:view];
[CCTexture2D setDefaultAlphaPixelFormat:kCCTexture2DPixelFormat_RGBA8888];
//启动一个场景
[director runWithScene:[HellowWorldLayer scene]];