资源简介
拼图游戏,一共四关,运用了一些特效,逻辑和视图的代码基本分离。
代码片段和文件信息
#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程序
相关资源
- 南航行李价格计算软件及其测试报告
- Ubuntu下Opencv显示中文
- 串口调试助手 vc 源代码
- 单USB双目摄像头拍摄程序
- 旅行模拟查询系统
-
openfr
ameworks英文教程 - VS2010 用CxImage读入各种图片格式后在内
- 程序员的自我修养(Epub)
- 航空订票系统 设计题目、需求分析、
- 拼图游戏源码.rar
- Windows网络编程第二版源码(补充材料
- a* 算法 人工智能 拼图游戏
- 学生管理系统(参考)
- 王桂林老师 cocos2dx课件.pdf
- 毕业设计-即时通信软件含论文
- QT写的超市管理系统
- 欧姆龙PLC以太网通讯在线调试过OK
- 二维码的生成与解析
- 基于QT制作的音乐播放器
- 学VC、编游戏pdf版
- 摄像头遮挡或黑屏检测
-
ob
jectARX自定义实体简单 - bacnet开发相关资料
- Wallis滤波
- Flash+ as3.0一个拖动的拼图游戏
- 基于STM32示波器 DDS信号发生器.zip
- 多态与虚拟多型與虛擬
- 基于Qt实现的猜数字游戏
- http 服务器
- WS2812库 arduino测试通过
评论
共有 条评论