cocos2d-x渲染框架
来源:互联网 发布:软件开发控制程序 编辑:程序博客网 时间:2024/05/13 06:51
渲染框架 包括 CCDirector CCScene CCLayer CCSprinte 四类
CCDirector 核心类 导演与场景有关的函数
// Scene Management
/** Enters the Director's main loop with the given Scene.
* Call it to run only your FIRST scene.
* Don't call it if there is already a running scene.
*
* It will call pushScene: and then it will call startAnimation
*/
void runWithScene(Scene *scene);
/** Suspends the execution of the running scene, pushing it on the stack of suspended scenes.
* The new scene will be executed.
* Try to avoid big stacks of pushed scenes to reduce memory allocation.
* ONLY call it if there is a running scene.
*/
void pushScene(Scene *scene);
/** Pops out a scene from the stack.
* This scene will replace the running one.
* The running scene will be deleted. If there are no more scenes in the stack the execution is terminated.
* ONLY call it if there is a running scene.
*/
void popScene();
/** Pops out all scenes from the stack until the root scene in the queue.
* This scene will replace the running one.
* Internally it will call `popToSceneStackLevel(1)`
*/
void popToRootScene();
/** Pops out all scenes from the stack until it reaches `level`.
If level is 0, it will end the director.
If level is 1, it will pop all scenes until it reaches to root scene.
If level is <= than the current stack level, it won't do anything.
*/
void popToSceneStackLevel(int level);
/** Replaces the running scene with a new one. The running scene is terminated.
* ONLY call it if there is a running scene.
*/
void replaceScene(Scene *scene);
/** Ends the execution, releases the running scene.
It doesn't remove the OpenGL view from its parent. You have to do it manually.
* @lua endToLua
*/
void end();
/** Pauses the running scene.
The running scene will be _drawed_ but all scheduled timers will be paused
While paused, the draw rate will be 4 FPS to reduce CPU consumption
*/
void pause();
/** Resumes the paused scene
The scheduled timers will be activated again.
The "delta time" will be 0 (as if the game wasn't paused)
*/
void resume();
/** Stops the animation. Nothing will be drawn. The main loop won't be triggered anymore.
If you don't want to pause your animation call [pause] instead.
*/
virtual void stopAnimation() = 0;
/** The main loop is triggered again.
Call this function only if [stopAnimation] was called earlier
@warning Don't call this function to start the main loop. To run the main loop call runWithScene
*/
virtual void startAnimation() = 0;
/** Draw the scene.
This method is called every frame. Don't call it manually.
*/
void drawScene();
- cocos2d-x渲染框架
- Cocos2D-X 渲染框架之CCLayer
- Cocos2D-X渲染框架之CCSprite
- Cocos2D-X 渲染框架之导演和场景
- cocos2d-x学习笔记(一):渲染框架1
- Cocos2d-x 文本渲染
- cocos2d-x渲染架构
- cocos2d-x 渲染
- 3.2 cocos2d-x渲染
- cocos2d-x 3.0渲染架构
- cocos2d-x渲染流程分析
- Cocos2d-x-3.10 SpriteBatchNode渲染
- Cocos2d-x 3.x的渲染流程
- 【Cocos2d-X开发学习笔记】第08期:渲染框架之文本类的使用
- 【Cocos2d-X开发学习笔记】第10期:渲染框架之几何图形的绘制
- 【Cocos2d-X开发学习笔记】第08期:渲染框架之文本类的使用
- 【Cocos2d-X开发学习笔记】第10期:渲染框架之几何图形的绘制
- 【Cocos2d-X开发学习笔记】第10期:渲染框架之几何图形的绘制DrawPrimitives
- 2014个人计划
- android ListView 报错 The specified child already has a parent
- Linux下timer的使用介绍,例子
- Android系统权限和root权限
- A Newbie's Guide on Revive AdServer (OpenX Source) 3.0.2 setup
- cocos2d-x渲染框架
- 构造函数、拷贝构造函数和析构函数的的调用时刻及调用顺序
- awk生成代码
- 在linux环境下安装Memcached及其简单使用+相关文档
- 多语言本地化
- 第一篇 微信商城 开发前的准备工作
- node性能提升,有关Cluset模块
- DMA读写
- 自定义xcode5.0模板