Cocos2d-x 3.0 物理引擎小demo
来源:互联网 发布:js遍历object数组 编辑:程序博客网 时间:2024/05/09 14:11
Make a physics game use cocos2d-x 3.0(part 1)
They packed Chipmunk into Cocos2d-x 3.0. I don’t make a physics game before, but I think physics game is more interesting than others. Let’s go!(ps: I want to practice my English so it is in English…)
Runtime
- Cocos2d-x 3.0
- Windows 7
- Python 2.7.5
- Visual studio 2012(for windows)
Create A new Project
Please google or baidu “how to create a project in cocos2d-x 3.0”
Here is my project :
Create A Pyhsics World
Following codes created a scene withphysics world and pass on child layer. Add codes in HelloWorldScene.h
Andadd following codes to createScene method
Create Pyhsics Boundary
In this version,everything need a node,following code show create physics boundary around the screen
Create a Ball
now,let's create a football in this world:
Run
ok,this demo is finished, if you want create more interesting objects,you can use thePhysicsEditor tools.
- Cocos2d-x 3.0 物理引擎小demo
- cocos2d-x物理引擎
- cocos2d-x物理引擎
- cocos2d-x 物理引擎
- Cocos2d-x 3.0 简捷的物理引擎
- cocos2d-x 物理引擎box2d
- cocos2d-x 物理引擎box2d
- cocos2d-x 物理引擎Box2D
- Cocos2d-x 3.0中的新物理引擎:Chipmunk和Box2d
- 在cocos2d-x 3.0中使用物理引擎
- cocos2d-x之物理引擎box2d(1)
- cocos2d-x之物理引擎box2d(2)
- cocos2d-x 物理引擎BOX2d学习
- Cocos2d-x Box2D物理引擎编译设置
- cocos2d-x-3.2启用Box2d物理引擎
- Cocos2d-x物理引擎世界的使用
- cocos2d-x-3.2 Box2d物理引擎起步
- Cocos2d-x教程Box2D 物理引擎
- 投稿Ueditor
- Android保持屏幕常亮唤醒状态
- 对于职业的规划
- 解决C#中js页面跳转传值出现的汉子乱码错误
- Wrong FS: hdfs:/ expected: file:///
- Cocos2d-x 3.0 物理引擎小demo
- JMS的基础认识
- 用unity3d实现游戏房间(lobby chat)
- 未能加载文件或程序集“AspNetPager”或它的某一个依赖项。拒绝访问。
- Oracle PL/SQL编程
- Java多线程并发编程学习
- 基于用户行为分析建立用户偏好模型
- tomcat cluster technology log
- Xcode快捷键