资源简介
拼图游戏,一共四关,运用了一些特效,逻辑和视图的代码基本分离。
![](http://www.nz998.com/pic/67705.jpg)
代码片段和文件信息
#include “AppDelegate.h“
#include “GameScene.h“
#include “StartScene.h“
#include “SimpleAudioEngine.h“
USING_NS_CC;
AppDelegate::AppDelegate() {
}
AppDelegate::~AppDelegate()
{
}
void AppDelegate::initGLContextAttrs()
{
//set OpenGL context attributionsnow can only set six attributions:
//redgreenbluealphadepthstencil
GLContextAttrs glContextAttrs = {8 8 8 8 24 8};
GLView::setGLContextAttrs(glContextAttrs);
}
bool AppDelegate::applicationDidFinishLaunching() {
// initialize director
auto director = Director::getInstance();
auto glview = director->getOpenGLView();
if(!glview) {
glview = GLViewImpl::create(“Puzzle“);
glview->setframeSize(400700);
director->setOpenGLView(glview);
}
auto screenSize = glview->getframeSize();
Size designSize;
designSize.width = 400;
designSize.height = screenSize.height * 400 / screenSize.width;
glview->setDesignResolutionSize(designSize.width designSize.height ResolutionPolicy::SHOW_ALL);
// turn on display FPS
director->setDisplayStats(false);
// set FPS. the default value is 1.0/60 if you don‘t call this
director->setAnimationInterval(1.0 / 60);
// audio effect
CocosDenshion::SimpleAudioEngine::getInstance()->preloadEffect(“sounds/victory.mp3“);
CocosDenshion::SimpleAudioEngine::getInstance()->preloadEffect(“sounds/start.wav“);
CocosDenshion::SimpleAudioEngine::getInstance()->preloadEffect(“sounds/level.wav“);
auto myScene = StartScene::createScene();
// running scene
director->runWithScene(myScene);
return true;
}
// This function will be called when the app is inactive. When comes a phone callit‘s be invoked too
void AppDelegate::applicationDidEnterBackground() {
Director::getInstance()->stopAnimation();
// if you use SimpleAudioEngine it must be pause
// SimpleAudioEngine::getInstance()->pauseBackgroundMusic();
}
// this function will be called when the app is active again
void AppDelegate::applicationWillEnterForeground() {
Director::getInstance()->startAnimation();
// if you use SimpleAudioEngine it must resume here
// SimpleAudioEngine::getInstance()->resumeBackgroundMusic();
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 2273 2015-05-26 19:08 cocos2dx 3.4 拼图游戏 源代码\Classes\AppDelegate.cpp
文件 1053 2015-03-18 10:08 cocos2dx 3.4 拼图游戏 源代码\Classes\AppDelegate.h
文件 16347 2015-05-26 20:53 cocos2dx 3.4 拼图游戏 源代码\Classes\GameScene.cpp
文件 1730 2015-05-26 20:45 cocos2dx 3.4 拼图游戏 源代码\Classes\GameScene.h
文件 5752 2015-05-26 12:06 cocos2dx 3.4 拼图游戏 源代码\Classes\LevelScene.cpp
文件 637 2015-05-25 21:17 cocos2dx 3.4 拼图游戏 源代码\Classes\LevelScene.h
文件 2211 2015-05-26 12:05 cocos2dx 3.4 拼图游戏 源代码\Classes\StartScene.cpp
文件 353 2015-05-24 17:03 cocos2dx 3.4 拼图游戏 源代码\Classes\StartScene.h
文件 50468 2009-06-11 04:43 cocos2dx 3.4 拼图游戏 源代码\Resources\fonts\ahronbd.ttf
文件 778552 2015-03-12 17:06 cocos2dx 3.4 拼图游戏 源代码\Resources\fonts\arial.ttf
文件 25776 2015-03-12 17:06 cocos2dx 3.4 拼图游戏 源代码\Resources\fonts\Marker Felt.ttf
文件 121344 2015-05-26 18:53 cocos2dx 3.4 拼图游戏 源代码\Resources\game.exe
文件 331776 2015-02-01 07:23 cocos2dx 3.4 拼图游戏 源代码\Resources\glew32.dll
文件 888832 2015-02-01 07:23 cocos2dx 3.4 拼图游戏 源代码\Resources\iconv.dll
文件 536149 2015-05-24 16:33 cocos2dx 3.4 拼图游戏 源代码\Resources\img\background.png
文件 3951 2015-05-21 21:13 cocos2dx 3.4 拼图游戏 源代码\Resources\img\box.png
文件 6311 2014-06-06 13:18 cocos2dx 3.4 拼图游戏 源代码\Resources\img\CloseNormal.png
文件 5499 2014-06-06 13:18 cocos2dx 3.4 拼图游戏 源代码\Resources\img\CloseSelected.png
文件 464462 2015-05-24 23:13 cocos2dx 3.4 拼图游戏 源代码\Resources\img\Clover.png
文件 24965 2015-05-25 16:45 cocos2dx 3.4 拼图游戏 源代码\Resources\img\Enter.png
文件 25500 2015-05-25 16:45 cocos2dx 3.4 拼图游戏 源代码\Resources\img\Enter2.png
文件 259222 2015-05-21 20:59 cocos2dx 3.4 拼图游戏 源代码\Resources\img\game.png
文件 542946 2015-05-22 22:23 cocos2dx 3.4 拼图游戏 源代码\Resources\img\level_1.png
文件 267175 2015-05-22 22:14 cocos2dx 3.4 拼图游戏 源代码\Resources\img\level_2.png
文件 330481 2015-05-24 22:43 cocos2dx 3.4 拼图游戏 源代码\Resources\img\level_3.png
文件 377945 2015-05-24 22:53 cocos2dx 3.4 拼图游戏 源代码\Resources\img\level_4.png
文件 25172 2015-05-25 17:51 cocos2dx 3.4 拼图游戏 源代码\Resources\img\next.png
文件 25490 2015-05-25 17:52 cocos2dx 3.4 拼图游戏 源代码\Resources\img\next2.png
文件 7779 2015-05-01 16:20 cocos2dx 3.4 拼图游戏 源代码\Resources\img\return.png
文件 7824 2015-05-01 22:28 cocos2dx 3.4 拼图游戏 源代码\Resources\img\return2.png
............此处省略31个文件信息
- 上一篇:UE4文档游戏性指南
- 下一篇:蓝桥杯嵌入式CT117E程序
相关资源
- VisualStudioUninstaller vs卸载工具
- 组态王驱动开发包3.0.0.7(中文)
- 多窗口后台鼠标连点器
- 使用选择性重传协议实现UDP可靠通信
- VC 获得文件属性 获取文件的创建时
- 读者写者问题(读者优先,写者优先
- 用VC 编写的仿QQ聊天室程序源代码
- 外点法程序
- 外罚函数程序
- qt-电子点菜系统
- 推箱子及人工智能寻路C 源代码
- 自己写的航空订票系统c 版--数据结构
- 数据结构实验魔王语言
- MUSIC算法c 实现
- C 餐厅叫号系统(QT平)
- 国际象棋c 完整版
-
ob
jectARX给Auto CAD加工具条 - 画图程序MFC/VC/VC CRectTracker 串行化
- MFC网络编程实例
- c 课程设计 职工信息管理系统
- VC 游戏编程—附源代码
- IpHlpApi.h&IpHlpApi.lib
- 清华大学 c 郑莉 ppt课件
- c 程序判断离散数学中命题公式
- 多项式求和(数据结构C 版)
- vc 6.0开发的流程图编辑器
- VC 天空盒(skyBox)实现(附源代码)
- c MFC 画多边形
- 用C 实现的对网络上的ARP数据包进行
- Microsoft基本类库 (MFC)(C 库)
评论
共有 条评论