SlideShare a Scribd company logo
1 of 14
背景&现状
基本框架
重要模块
辅助工具
背景&现状
iPhone Top Grossing 中国区50%游戏为Cocos2D-X开发
背景&现状
海外开发者产品在 Google Play 下载总规模超过1亿次
背景&现状
基本框架
基本框架
基本框架
重要模块
内存管理
类似于Objective-C的内存管理机制:retain(), release(),
autorelease()
使用Cocos2dx的工厂方法(如create)创建的对象为
autorelease对象。如果需要该对象生命周期可控制,需要
手动retain(),release()
addChild(),removeChild()默认带有retain()和release()
重要模块
CCNode
一切游戏元素的父节点
设置可绘制对象的通用特性:位置,缩放,可见,旋转
接收各种事件的回调函数
执行CCAction
绘图坐标系
重要模块
CCAction
定义某CCNode元素的动作
基本的属性动画:CCMoveTo,CCScaleTo,CCRotateTo,
CCFadeTo,CCBlink等。参数:变化幅度,时间dt
帧动画:CCAnimation。参数:帧图片集,帧间隔。
重要模块
触摸事件
启用:setTouchable(true)
回调函数:ccTouch(es)Begin,ccTouch(es)Moved,
ccTouch(es)Ended,ccTouch(es)Cancelled
StandardTouch
每次接受多个触摸点
TargetedTouch
每次接受一个触摸点
优先于StandardTouch
可设置优先级,swallow属性
重要模块
CCSchedule定时器
scheduleUpdate():更新定时器。每帧调用一次。每个
CCNode只能有一个被调度的update函数
Schedule():自定义定时器。指定间隔的时间点自动调用
unscheduleUpdate()
unschedule()
unscheduleAllSelector()
辅助工具
物理编辑:PhysicsEditor,VertexHelper
粒子效果:Particle Designer
BitMap Font:BMFont
场景编辑:CocosBuilder,LevelHelper
Texture Altas工具:TexturePacker
Tilemap工具:TiledMapEditor
documen.tips_cocos2d-x

More Related Content

Similar to documen.tips_cocos2d-x

Android应用开发 - 沈大海
Android应用开发 - 沈大海Android应用开发 - 沈大海
Android应用开发 - 沈大海Shaoning Pan
 
component based html5 game engine
component based html5 game enginecomponent based html5 game engine
component based html5 game enginehbbalfred
 
Microsoft CNTK, Cognitive Toolkit 微軟深度學習工具
Microsoft CNTK, Cognitive Toolkit 微軟深度學習工具Microsoft CNTK, Cognitive Toolkit 微軟深度學習工具
Microsoft CNTK, Cognitive Toolkit 微軟深度學習工具HO-HSUN LIN
 
Api Code Pack For Net Framework
Api Code Pack For Net FrameworkApi Code Pack For Net Framework
Api Code Pack For Net FrameworkChui-Wen Chiu
 
mixin based component infrastructure
mixin based component infrastructuremixin based component infrastructure
mixin based component infrastructureyiming he
 
Xcode tutorial
Xcode tutorialXcode tutorial
Xcode tutorialMarch Liu
 
Windows Mobile 6 遊戲開發入門
Windows Mobile 6 遊戲開發入門Windows Mobile 6 遊戲開發入門
Windows Mobile 6 遊戲開發入門Chui-Wen Chiu
 
Android 智慧型手機程式設計
Android 智慧型手機程式設計Android 智慧型手機程式設計
Android 智慧型手機程式設計Kyle Lin
 
2017 unity5 manual_intro
2017 unity5 manual_intro2017 unity5 manual_intro
2017 unity5 manual_introRiver Wang
 
Cocos2d x presentation cocoachina-王哲
Cocos2d x presentation cocoachina-王哲Cocos2d x presentation cocoachina-王哲
Cocos2d x presentation cocoachina-王哲csdnmobile
 
使用 Visual Studio Code 建構 JavaScript 應用程式
使用 Visual Studio Code 建構 JavaScript 應用程式使用 Visual Studio Code 建構 JavaScript 應用程式
使用 Visual Studio Code 建構 JavaScript 應用程式Will Huang
 
杜增强 Flash移动开发优化技巧
杜增强 Flash移动开发优化技巧杜增强 Flash移动开发优化技巧
杜增强 Flash移动开发优化技巧增强 杜
 

Similar to documen.tips_cocos2d-x (18)

Android应用开发 - 沈大海
Android应用开发 - 沈大海Android应用开发 - 沈大海
Android应用开发 - 沈大海
 
component based html5 game engine
component based html5 game enginecomponent based html5 game engine
component based html5 game engine
 
香港六合彩
香港六合彩香港六合彩
香港六合彩
 
香港六合彩
香港六合彩香港六合彩
香港六合彩
 
Roll a ball遊戲專案
Roll a ball遊戲專案Roll a ball遊戲專案
Roll a ball遊戲專案
 
Microsoft CNTK, Cognitive Toolkit 微軟深度學習工具
Microsoft CNTK, Cognitive Toolkit 微軟深度學習工具Microsoft CNTK, Cognitive Toolkit 微軟深度學習工具
Microsoft CNTK, Cognitive Toolkit 微軟深度學習工具
 
Api Code Pack For Net Framework
Api Code Pack For Net FrameworkApi Code Pack For Net Framework
Api Code Pack For Net Framework
 
mixin based component infrastructure
mixin based component infrastructuremixin based component infrastructure
mixin based component infrastructure
 
Xcode tutorial
Xcode tutorialXcode tutorial
Xcode tutorial
 
Windows Mobile 6 遊戲開發入門
Windows Mobile 6 遊戲開發入門Windows Mobile 6 遊戲開發入門
Windows Mobile 6 遊戲開發入門
 
Android 智慧型手機程式設計
Android 智慧型手機程式設計Android 智慧型手機程式設計
Android 智慧型手機程式設計
 
I os 01
I os 01I os 01
I os 01
 
2017 unity5 manual_intro
2017 unity5 manual_intro2017 unity5 manual_intro
2017 unity5 manual_intro
 
Cocos2d x presentation cocoachina-王哲
Cocos2d x presentation cocoachina-王哲Cocos2d x presentation cocoachina-王哲
Cocos2d x presentation cocoachina-王哲
 
使用 Visual Studio Code 建構 JavaScript 應用程式
使用 Visual Studio Code 建構 JavaScript 應用程式使用 Visual Studio Code 建構 JavaScript 應用程式
使用 Visual Studio Code 建構 JavaScript 應用程式
 
Build Your Own Android Toolchain from scratch
Build Your Own Android Toolchain from scratchBuild Your Own Android Toolchain from scratch
Build Your Own Android Toolchain from scratch
 
杜增强 Flash移动开发优化技巧
杜增强 Flash移动开发优化技巧杜增强 Flash移动开发优化技巧
杜增强 Flash移动开发优化技巧
 
Android JNI
Android JNIAndroid JNI
Android JNI
 

documen.tips_cocos2d-x