cocos2dx3.3开发FlappyBird总结十四:常量定义
2015-03-20 14:53
351 查看
游戏层中水管等需要常量:
#ifndef EngryBird_AppConstant_h #define EngryBird_AppConstant_h /** * The pipe has four state, using the following tag to mark. * > the state up * > the state down * > the state passed * > the state new created */ const int kPipeUpTag = 21; const int kPipeDownTag = 12; const int kPipePassedTag = 30; const int kPipeNewTag = 31; /** * > the pipe's height * > the pipe's width * > the speed of pipe moves * > the distance between the down pipe and up pipe * > the distance between the pipes vertical * > the number of pipe pairs display int the screen in the same time * > the distance that the pipe will display in the screen, for player to ready */ const int kPipeHeight = 320; const int kPipeWidth = 52; const float kPipeShiftSpeed = 80.0f; const int kPipeUpDownDistance = 100; const int kPipeInterval = 180; const int kPipePairCount = 2; const int kWaitDistance = 100; /** * The radius of the bird */ const int kBirdRadius = 15; /** * The width and height of the design resolution */ const int kDesignWidth = 288; const int kDesignHeight = 512; /** * The tag of game layer in the scene */ const int kGameLayerTag = 101; #endif
相关文章推荐
- cocos2dx3.3开发FlappyBird总结四:资源管理类
- cocos2dx3.3开发FlappyBird总结九:欢迎场景(WelcomeScene)
- cocos2dx3.3开发FlappyBird总结五:说说屏幕适配
- cocos2dx3.3开发FlappyBird总结七:说说游戏流程
- cocos2dx3.3开发FlappyBird总结十六:游戏层实现
- cocos2dx3.3开发FlappyBird总结十一:控制层功能设计
- cocos2dx3.3开发FlappyBird总结八:载入场景LoadingScene
- cocos2dx3.3开发FlappyBird总结十三:数字特效类
- cocos2dx3.3开发FlappyBird总结十五:记录玩家得分
- cocos2dx3.3开发FlappyBird总结十二:状态层设计
- cocos2dx3.3开发FlappyBird总结十:背景层设计
- cocos2dx3.3开发FlappyBird总结六:设计共享小鸟类(主角)
- cocos2dx3.3开发FlappyBird总结三:项目剖析
- cocos2dx3.3开发FlappyBird总结一:背景介绍
- cocos2dx3.3开发FlappyBird总结十七:结束语
- cocos2dxFlappyBird开发总结二:开发环境介绍
- HBase总结(十四)LINUX下用Eclipse构建HBase开发环境
- html5+jQuery Mobile开发移动端wap经验总结(二)- a / input样式重新定义
- cocos2dx3.3在Win7(64位)上Android开发环境搭建(提要)
- 【COCOS2DX-LUA 脚本开发之十四】解决自定义cpp类通过tolua++ binding LuaCocos2d后编译到Android运行黑屏(没有调用自定义cpp类)的问题!