资源简介
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++ ffmpeg Release版本
- 医院管理系统 C++
- C++写的模拟ATM机程序
- P2P 聊天室 c++ 版本 附详细文档
- c++笔试面试之数据结构与算法
- vc++和OpenGL实现三维地形实时动态显示
- 《VC++深入详解》源代码
- qt2048/c++2048
- 教学计划编制 C++ 数据结构
- QQ可用 Directshow实现的虚拟摄像头win
- VC++ 推箱子游戏源代码(双缓存版)
- VC++ Win32俄罗斯方块游戏源码(新)
- C++17 STL Cookbook
- ACE程序员指南
- 数据结构C++版第三版 习题解析 邓俊辉
- Eclipse C/C++ 自动补全的cdt补丁
- VS2008 MFC简易计算器
- 牛客网2019校招面试题库C++
- Exploring C++ 无水印pdf
-
Data Structures and Other ob
jects Using C++( - Boost.Asio C++ Network Programming(2nd) 无水
- Data Structures Using C++(2nd) 无水印原版
- C++ For Dummies(7th) 无水印原版pdf
- C++ Primer(5th)2017Edition 无水印pdf
- C++游戏编程之扫雷大量注释新手福音
- C++图形系统实现俄罗斯方块小游戏
- VC++2008简体中文版
- 用vc++实现文件加密功能的源代码
- MFC登录注册系统C++
- C++ 实用小程序与多个课程设计收集适
评论
共有 条评论