资源简介
c++ cocos2d写的坦克小游戏,采用经典90坦克素材,完整还原核心功能

代码片段和文件信息
/****************************************************************************
Copyright (c) 2017-2018 Xiamen Yaji Software Co. Ltd.
http://www.cocos2d-x.org
Permission is hereby granted free of charge to any person obtaining a copy
of this software and associated documentation files (the “Software“) to deal
in the Software without restriction including without limitation the rights
to use copy modify merge publish distribute sublicense and/or sell
copies of the Software and to permit persons to whom the Software is
furnished to do so subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS“ WITHOUT WARRANTY OF ANY KIND EXPRESS OR
IMPLIED INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM DAMAGES OR OTHER
LIABILITY WHETHER IN AN ACTION OF CONTRACT TORT OR OTHERWISE ARISING FROM
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
****************************************************************************/
#include “AppDelegate.h“
#include “welcome_scene.h“
// #define USE_AUDIO_ENGINE 1
// #define USE_SIMPLE_AUDIO_ENGINE 1
#if USE_AUDIO_ENGINE && USE_SIMPLE_AUDIO_ENGINE
#error “Don‘t use AudioEngine and SimpleAudioEngine at the same time. Please just select one in your game!“
#endif
#if USE_AUDIO_ENGINE
#include “audio/include/AudioEngine.h“
using namespace cocos2d::experimental;
#elif USE_SIMPLE_AUDIO_ENGINE
#include “audio/include/SimpleAudioEngine.h“
using namespace CocosDenshion;
#endif
USING_NS_CC;
static cocos2d::Size designResolutionSize = cocos2d::Size(480 320);
//static cocos2d::Size designResolutionSize = cocos2d::Size(600 400); // for windows
static cocos2d::Size smallResolutionSize = cocos2d::Size(480 320);
static cocos2d::Size mediumResolutionSize = cocos2d::Size(1024 768);
static cocos2d::Size largeResolutionSize = cocos2d::Size(2048 1536);
AppDelegate::AppDelegate()
{
}
AppDelegate::~AppDelegate()
{
#if USE_AUDIO_ENGINE
AudioEngine::end();
#elif USE_SIMPLE_AUDIO_ENGINE
SimpleAudioEngine::end();
#endif
}
// if you want a different context modify the value of glContextAttrs
// it will affect all platforms
void AppDelegate::initGLContextAttrs()
{
// set OpenGL context attributes: redgreenbluealphadepthstencilmultisamplesCount
GLContextAttrs glContextAttrs = {8 8 8 8 24 8 0};
GLView::setGLContextAttrs(glContextAttrs);
}
// if you want to use the package manager to install more packages
// don‘t modify or remove this function
static int register_all_packages()
{
return 0; //flag for packages manager
}
bool AppDelegate::applicationDidFinishLaunching() {
// initialize director
auto director = Director::getInstance();
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2019-09-28 16:00 MyTankGame\
文件 5201 2019-08-13 22:45 MyTankGame\CMakeLists.txt
目录 0 2019-09-26 23:22 MyTankGame\Classes\
文件 2225 2019-08-13 22:45 MyTankGame\Classes\AppDelegate.h
目录 0 2019-09-28 16:00 __MACOSX\
目录 0 2019-09-28 16:00 __MACOSX\MyTankGame\
目录 0 2019-09-28 16:00 __MACOSX\MyTankGame\Classes\
文件 176 2019-08-13 22:45 __MACOSX\MyTankGame\Classes\._AppDelegate.h
文件 6148 2019-09-28 16:00 MyTankGame\Classes\.DS_Store
文件 120 2019-09-28 16:00 __MACOSX\MyTankGame\Classes\._.DS_Store
文件 8425 2019-09-26 21:51 MyTankGame\Classes\pla
文件 176 2019-09-26 21:51 __MACOSX\MyTankGame\Classes\._pla
文件 417 2019-09-21 23:01 MyTankGame\Classes\item.h
文件 423 2019-09-21 23:01 __MACOSX\MyTankGame\Classes\._item.h
文件 769 2019-09-21 23:20 MyTankGame\Classes\battle_field.h
文件 423 2019-09-21 23:20 __MACOSX\MyTankGame\Classes\._battle_field.h
文件 4331 2019-09-22 22:45 MyTankGame\Classes\welcome_scene.cpp
文件 176 2019-09-22 22:45 __MACOSX\MyTankGame\Classes\._welcome_scene.cpp
文件 1139 2019-09-21 23:06 MyTankGame\Classes\pla
文件 423 2019-09-21 23:06 __MACOSX\MyTankGame\Classes\._pla
文件 1006 2019-09-22 23:33 MyTankGame\Classes\item.cpp
文件 176 2019-09-22 23:33 __MACOSX\MyTankGame\Classes\._item.cpp
文件 382 2019-08-15 21:19 MyTankGame\Classes\welcome_scene.h
文件 266 2019-08-15 21:19 __MACOSX\MyTankGame\Classes\._welcome_scene.h
文件 1908 2019-09-26 23:03 MyTankGame\Classes\game_scene.h
文件 333 2019-09-26 23:03 __MACOSX\MyTankGame\Classes\._game_scene.h
文件 565 2019-09-26 21:43 MyTankGame\Classes\bullet.h
文件 423 2019-09-26 21:43 __MACOSX\MyTankGame\Classes\._bullet.h
文件 14888 2019-09-25 22:16 MyTankGame\Classes\battle_field.cpp
文件 176 2019-09-25 22:16 __MACOSX\MyTankGame\Classes\._battle_field.cpp
文件 8769 2019-09-21 21:56 MyTankGame\Classes\joypad.cpp
............此处省略460个文件信息
- 上一篇:功能全面的mfc Web浏览器
- 下一篇:C++ ffmpeg Release版本
相关资源
- C++获取计算机的CPU ID,硬盘序列号等
- C++头文件转delphi工具 + 源码
- 国际象棋的qt源代码
- C++中头文件与源文件的作用详解
- C++多线程网络编程Socket
- VC++ 多线程文件读写操作
- 猜数字游戏 c语言代码
- 利用C++哈希表的方法实现电话号码查
- 移木块游戏,可以自编自玩,vc6.0编写
- C++纯文字DOS超小RPG游戏
- LINUX下命令行界面的C语言细胞游戏
- VC++MFC小游戏实例教程(实例)+MFC类库
- 用C语言实现的一个打字游戏
- C语言版3D魔方游戏源代码
- 连铸温度场计算程序(C++)
- 6自由度机器人运动学正反解C++程序
- Em算法(使用C++编写)
- libstdc++-4.4.7-4.el6.i686.rpm
- VC++实现CMD命令执行与获得返回信息
- 白话C++(全)
- C++标准库第1、2
- 大数类c++大数类
- C++语言编写串口调试助手
- c++素数筛选法
- C++ mqtt 用法
- 商品库存管理系统 C++ MFC
- c++ 多功能计算器
- C++17 In Detail
- 嵌入式QtC++编程课件
- 颜色识别形状识别STM103嵌入式代码
评论
共有 条评论