资源简介
cpp-empty-test.zip
代码片段和文件信息
#include “AppDelegate.h“
#include
#include
#include “HelloWorldScene.h“
#include “AppMacros.h“
USING_NS_CC;
using namespace std;
AppDelegate::AppDelegate() {
}
AppDelegate::~AppDelegate()
{
}
void AppDelegate::initGLContextAttrs()
{
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(“Cpp Empty Test“);
director->setOpenGLView(glview);
}
director->setOpenGLView(glview);
// Set the design resolution
#if (CC_TARGET_PLATFORM == CC_PLATFORM_WP8)
// a bug in DirectX 11 level9-x on the device prevents ResolutionPolicy::NO_BORDER from working correctly
glview->setDesignResolutionSize(designResolutionSize.width designResolutionSize.height ResolutionPolicy::SHOW_ALL);
#else
glview->setDesignResolutionSize(designResolutionSize.width designResolutionSize.height ResolutionPolicy::NO_BORDER);
#endif
Size frameSize = glview->getframeSize();
vector searchPath;
// In this demo we select resource according to the frame‘s height.
// If the resource size is different from design resolution size you need to set contentScaleFactor.
// We use the ratio of resource‘s height to the height of design resolution
// this can make sure that the resource‘s height could fit for the height of design resolution.
// if the frame‘s height is larger than the height of medium resource size select large resource.
if (frameSize.height > mediumResource.size.height)
{
searchPath.push_back(largeResource.directory);
director->setContentScaleFactor(MIN(largeResource.size.height/designResolutionSize.height largeResource.size.width/designResolutionSize.width));
}
// if the frame‘s height is larger than the height of small resource size select medium resource.
else if (frameSize.height > smallResource.size.height)
{
searchPath.push_back(mediumResource.directory);
director->setContentScaleFactor(MIN(mediumResource.size.height/designResolutionSize.height mediumResource.size.width/designResolutionSize.width));
}
// if the frame‘s height is smaller than the height of medium resource size select small resource.
else
{
searchPath.push_back(smallResource.directory);
director->setContentScaleFactor(MIN(smallResource.size.height/designResolutionSize.height smallResource.size.width/designResolutionSize.width));
}
// set searching path
FileUtils::getInstance()->setSearchPaths(searchPath);
// turn on display FPS
director->setDisplayStats(true);
// set FPS. the default value is 1.0/60 if you don‘t call this
director->setAnimationInterval(1.0 / 60);
// create a scene. it‘s an autorelease object
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2015-04-18 22:35 cpp-empty-test\
文件 1417 2014-12-12 21:47 cpp-empty-test\.cocos-project.json
目录 0 2015-04-19 01:42 cpp-empty-test\Classes\
文件 3717 2014-12-12 21:47 cpp-empty-test\Classes\AppDelegate.cpp
文件 991 2014-12-12 21:47 cpp-empty-test\Classes\AppDelegate.h
文件 2732 2014-12-12 21:47 cpp-empty-test\Classes\AppMacros.h
文件 3167 2015-04-19 16:04 cpp-empty-test\Classes\HelloWorldScene.cpp
文件 775 2015-04-19 15:37 cpp-empty-test\Classes\HelloWorldScene.h
文件 2387 2014-12-12 21:47 cpp-empty-test\CMakeLists.txt
目录 0 2015-04-18 22:35 cpp-empty-test\proj-wp8-xaml\
目录 0 2015-04-18 22:35 cpp-empty-test\proj-wp8-xaml\cpp-empty-test\
目录 0 2015-04-18 22:35 cpp-empty-test\proj-wp8-xaml\cpp-empty-test\Assets\
文件 9042 2014-12-12 21:47 cpp-empty-test\proj-wp8-xaml\cpp-empty-test\Assets\AlignmentGrid.png
文件 3392 2014-12-12 21:47 cpp-empty-test\proj-wp8-xaml\cpp-empty-test\Assets\ApplicationIcon.png
目录 0 2015-04-18 22:35 cpp-empty-test\proj-wp8-xaml\cpp-empty-test\Assets\Tiles\
文件 9930 2014-12-12 21:47 cpp-empty-test\proj-wp8-xaml\cpp-empty-test\Assets\Tiles\FlipCycleTileLarge.png
文件 9070 2014-12-12 21:47 cpp-empty-test\proj-wp8-xaml\cpp-empty-test\Assets\Tiles\FlipCycleTileMedium.png
文件 3674 2014-12-12 21:47 cpp-empty-test\proj-wp8-xaml\cpp-empty-test\Assets\Tiles\FlipCycleTileSmall.png
文件 4937 2014-12-12 21:47 cpp-empty-test\proj-wp8-xaml\cpp-empty-test\Assets\Tiles\IconicTileMediumLarge.png
文件 3724 2014-12-12 21:47 cpp-empty-test\proj-wp8-xaml\cpp-empty-test\Assets\Tiles\IconicTileSmall.png
文件 8046 2014-12-12 21:47 cpp-empty-test\proj-wp8-xaml\cpp-empty-test\cpp-empty-test.csproj
文件 344 2014-12-12 21:47 cpp-empty-test\proj-wp8-xaml\cpp-empty-test\LocalizedStrings.cs
文件 2212 2014-12-12 21:47 cpp-empty-test\proj-wp8-xaml\cpp-empty-test\Package.appxmanifest
目录 0 2015-04-18 22:35 cpp-empty-test\proj-wp8-xaml\cpp-empty-test\Properties\
文件 201 2014-12-12 21:47 cpp-empty-test\proj-wp8-xaml\cpp-empty-test\Properties\AppManifest.xm
文件 1429 2014-12-12 21:47 cpp-empty-test\proj-wp8-xaml\cpp-empty-test\Properties\AssemblyInfo.cs
文件 1984 2014-12-12 21:47 cpp-empty-test\proj-wp8-xaml\cpp-empty-test\Properties\WMAppManifest.xm
目录 0 2015-04-18 22:35 cpp-empty-test\proj-wp8-xaml\cpp-empty-test\Resources\
文件 3083 2014-12-12 21:47 cpp-empty-test\proj-wp8-xaml\cpp-empty-test\Resources\AppResources.Designer.cs
文件 5796 2014-12-12 21:47 cpp-empty-test\proj-wp8-xaml\cpp-empty-test\Resources\AppResources.resx
文件 119747 2014-12-12 21:47 cpp-empty-test\proj-wp8-xaml\cpp-empty-test\SplashScreenImage.jpg
............此处省略126个文件信息
- 上一篇:WoMic手机当做电脑麦克风(安卓机可用)
- 下一篇:火电厂各系统流程图(主系统)
相关资源
- 15x40j.rar
- ZeuS2.0.8.9.7z
- OperatingSystems.pdf
- layuiAdmin.pack-v1.1.zip
- SaveVPN_Win32.exe
- MagicEXIF元数据编辑器v1.08Build1219(旗舰
- PSiCC2-CN中文_Password_Removed.pdf
- doc(5)
- 苹果CMSV10模版_1080KPCWAP附火车头采集规
- IEC61131-2(GBT15969.2)2007版.pdf
- CVI2009_SP1(绿色版文件库).7z
- CreatingInterfaceswithBulma.pdf
- Flask.Web.Development.2nd.Edition.pdf
- lpwmm_10370863.zip
- 6.55破解.rar107385
- T3V10.9破解补丁.rar
- App架构.epub.zip
- winrar5.50.rar
- img.rar
- 银行转账截图软件.rar
- www.360ysdh.com电影导航源码.rar
- 爱快多拔.zip
- qcds23.rar
- 11016119李永强实习源代码.rar
- 清华大学操作系统课件_向勇老师的讲
- 2140331Setup.zip
- 16字节加解密的AES算法.zip
- RSA_签名与验签.rar
- Sim_EKB_Install_2019_12_04.rar
- 自动避障与自主航路规划文章及代码
评论
共有 条评论