资源简介
majiang.rar
代码片段和文件信息
#include “AppDelegate.h“
#include “AppMacros.h“
#include “cocos2d.h“
#include “SimpleAudioEngine.h“
#include “Scene/LoadingScene.h“
#include “Scene/GameScene.h“
#include “Common/ConstantDef.h“
USING_NS_CC;
int AppDelegate::cur_scene_flag = cur_scene_valid;
CClayer* AppDelegate::g_player = NULL;
AppDelegate::AppDelegate()
{
}
AppDelegate::~AppDelegate()
{
}
bool AppDelegate::applicationDidFinishLaunching()
{
// initialize director
CCDirector* pDirector = CCDirector::sharedDirector();
CCEGLView* pEGLView = CCEGLView::sharedOpenGLView();
pDirector->setOpenGLView(pEGLView);
CCSize frameSize = pEGLView->getframeSize();
CCLOG(“ScreenSize width:%f height:%f“ frameSize.width frameSize.height);
#if (SCREEN_ORIENTATION == SCREEN_ORIENTATION_LANDSCAPE) // 横屏
float frameScale = frameSize.width/frameSize.height;
#elif (SCREEN_ORIENTATION == SCREEN_ORIENTATION_PORTRAIT) // 竖屏
float frameScale = frameSize.height/frameSize.width;
#else
#error unknown target ORIENTATION!
#endif
if( frameScale < 3.0f/2.0f ) // 窄屏,屏幕宽度:高度小于3:2
{
// Set the design resolution
pEGLView->setDesignResolutionSize(designResolutionSize.width designResolutionSize.height kResolutionShowAll);
}
else
{
// Set the design resolution
pEGLView->setDesignResolutionSize(designResolutionSize.width designResolutionSize.height kResolutionNoBorder);
}
//use fixed resource
float fScale = MIN(designResolutionRes.size.width/designResolutionSize.width designResolutionRes.size.height/designResolutionSize.height);
// CCFileUtils::sharedFileUtils()->setResourceDirectory(designResolutionRes.directory);
pDirector->setContentScaleFactor(fScale);
CCLOG(“setContentScaleFactor fscale: %f res.size(%f %f) deSize(%f %f)“ fScale designResolutionRes.size.width designResolutionRes.size.height designResolutionSize.width designResolutionSize.height);
// turn on display FPS lyp 取消帧率
//pDirector->setDisplayStats(true);
// set FPS. the default value is 1.0/60 if you don‘t call this lyp 取消帧率
//pDirector->setAnimationInterval(1.0 / 50);
// create a scene. it‘s an autorelease object
// CCScene* pScene = CSceneInit::scene();
// CCScene* pScene = SceneLogo::scene();
CCScene* pScene = LoadingScene::scene(TargetSceneMainScene);
// run
pDirector->runWithScene(pScene);
return true;
}
// This function will be called when the app is inactive. When comes a phone callit‘s be invoked too
void AppDelegate::applicationDidEnterBackground() {
CCDirector::sharedDirector()->stopAnimation();
// if you use SimpleAudioEngine it must be pause
// SimpleAudioEngine::sharedEngine()->pauseBackgroundMusic();
// if you use SimpleAudioEngine it must be pause
CocosDenshion::SimpleAudioEngine::sharedEngine()->pauseBackgroundMusic();
CocosDenshion::SimpleAudioEngine::sharedEngine()->pauseAllEffects();
}
// this function will be called when the app is active again
void AppDelegate::ap
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 3258 2014-07-09 14:50 majiang\Classes\AppDelegate.cpp
文件 1339 2014-12-11 11:53 majiang\Classes\AppDelegate.cpp--
文件 1110 2014-07-08 21:34 majiang\Classes\AppDelegate.h
文件 955 2014-12-11 11:53 majiang\Classes\AppDelegate.h--
文件 4394 2014-06-22 18:33 majiang\Classes\AppMacros.cpp
文件 2862 2014-01-08 11:06 majiang\Classes\AppMacros.h
文件 2765 2014-12-11 11:53 majiang\Classes\AppMacros.h--
文件 2012 2014-07-08 21:55 majiang\Classes\CallJni.cpp
文件 482 2014-07-08 21:38 majiang\Classes\CallJni.h
文件 97038 2016-03-27 02:06 majiang\Classes\Common\CommonFunction.cpp
文件 8102 2014-06-27 15:31 majiang\Classes\Common\CommonFunction.h
文件 60029 2016-03-27 15:37 majiang\Classes\Common\ConstantDef.h
文件 9410 2013-08-09 15:20 majiang\Classes\Common\md5.cpp
文件 1396 2013-08-09 15:20 majiang\Classes\Common\md5.h
文件 14310 2014-01-07 09:43 majiang\Classes\Common\MyTinyxm
文件 840 2014-01-06 17:49 majiang\Classes\Common\MyTinyxm
文件 219 2013-08-09 15:20 majiang\Classes\Entity\DeskEntity.cpp
文件 820 2013-08-09 15:20 majiang\Classes\Entity\DeskEntity.h
文件 30472 2014-01-03 14:01 majiang\Classes\GameCore\AI\Robot.cpp
文件 3358 2014-01-03 12:13 majiang\Classes\GameCore\AI\Robot.h
文件 8537 2014-01-03 15:15 majiang\Classes\GameCore\ClientCommon.h
文件 4811 2014-01-03 15:15 majiang\Classes\GameCore\Clientfr
文件 13268 2013-08-09 15:20 majiang\Classes\GameCore\ClientMjDefs.h
文件 1977 2014-01-03 15:15 majiang\Classes\GameCore\ClientScoreDefs.h
文件 190666 2014-01-03 12:09 majiang\Classes\GameCore\GameLogical.cpp
文件 15752 2014-01-03 12:08 majiang\Classes\GameCore\GameLogical.h
文件 11356 2014-06-27 22:16 majiang\Classes\GameCore\MjDef.h
文件 1014 2013-08-09 15:20 majiang\Classes\GameCore\RuleGen\RuleDef.h
文件 6018 2014-01-03 12:09 majiang\Classes\GameCore\Serverfr
文件 706 2014-01-02 16:52 majiang\Classes\GameCore\TypeDef.h
............此处省略799个文件信息
- 上一篇:亚洲范围内的全部河网矢量图
- 下一篇:CAN总线嵌入式开发 从入门到实战 第2版
相关资源
- CD2.0.pdf
- Windows程序设计(第5版珍藏版).扫描
- 编程珠玑第2版•修订版.[美]JonBentle
- CPrime第6版.pdf.zip
- 打开量化投资的黑箱__原书第2版__美里
- 深网-Google搜不到的世界.pdf
- 常微分方程教程-丁同仁.pdf
- Location.zip
- gradle1.6.rar
- com.dezhou2.rar
- H5牛牛源码微信牛牛带后台控制12345
- Windows网络编程之Delphi篇——完整版
- PartialDifferentialEquations+SecondEdition+201
- tiger_newhu5.99.73.zip
- 华南理工大学自动控制原理习题集答
- Kali.7z
- ParagonNTFS15.5.65.zip
- 自然语言处理综论.Daniel.第二版.pdf
- 统计学习方法-电子书及代码实现-李航
- HandsonMachineLearningwithScikit2E.zip
- zw_GraingerJohnJ.andWilliamD.Stevenson.Powersy
- test.pcm
- 高清GD和T几何尺寸与公差全文培训教
- SD.rar
- Battery_charge_discharge_400V_2015.zip
- 概率、随机变量与随机过程第4版.pd
- Web应用程序安全(原书第3版).pdf
- 游戏之巅.pdf
- z32nbp.pdf
- 信号与系统第三版-曾禹村编.pdf
评论
共有 条评论