91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 14KB
    文件類型: .zip
    金幣: 2
    下載: 0 次
    發(fā)布日期: 2021-05-12
  • 語(yǔ)言: C/C++
  • 標(biāo)簽: 黃金礦工??

資源簡(jiǎn)介

今后上傳的資源都會(huì)免費(fèi)提供下載,包括我開(kāi)發(fā)的demo項(xiàng)目和游戲素材,技術(shù)體會(huì)都將上傳。

資源截圖

代碼片段和文件信息

#include?“AppDelegate.h“
#include?“HelloWorldScene.h“

USING_NS_CC;

static?cocos2d::Size?designResolutionSize?=?cocos2d::Size(960640);
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?you?want?a?different?contextjust?modify?the?value?of?glContextAttrs
//it?will?takes?effect?on?all?platforms
void?AppDelegate::initGLContextAttrs()
{
????//set?OpenGL?context?attributionsnow?can?only?set?six?attributions:
????//redgreenbluealphadepthstencil
????GLContextAttrs?glContextAttrs?=?{8?8?8?8?24?8};

????GLView::setGLContextAttrs(glContextAttrs);
}

//?If?you?want?to?use?packages?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();
????auto?glview?=?director->getOpenGLView();
????if(!glview)?{
#if?(CC_TARGET_PLATFORM?==?CC_PLATFORM_WIN32)?||?(CC_TARGET_PLATFORM?==?CC_PLATFORM_MAC)?||?(CC_TARGET_PLATFORM?==?CC_PLATFORM_LINUX)
????????glview?=?GLViewImpl::createWithRect(“LiuJunLiang“?Rect(0?0?designResolutionSize.width?designResolutionSize.height));
#else
????????glview?=?GLViewImpl::create(“LiuJunLiang“);
#endif
????????director->setOpenGLView(glview);
????}

????//?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.0f?/?60);

????//?Set?the?design?resolution
????glview->setDesignResolutionSize(designResolutionSize.width?designResolutionSize.height?ResolutionPolicy::NO_BORDER);
????Size?frameSize?=?glview->getframeSize();
????//?if?the?frame‘s?height?is?larger?than?the?height?of?medium?size.
????if?(frameSize.height?>?mediumResolutionSize.height)
????{????????
????????director->setContentScaleFactor(MIN(largeResolutionSize.height/designResolutionSize.height?largeResolutionSize.width/designResolutionSize.width));
????}
????//?if?the?frame‘s?height?is?larger?than?the?height?of?small?size.
????else?if?(frameSize.height?>?smallResolutionSize.height)
????{????????
????????director->setContentScaleFactor(MIN(mediumResolutionSize.height/designResolutionSize.height?mediumResolutionSize.width/designResolutionSize.width));
????}
????//?if?the?frame‘s?height?is?smaller?than?the?height?of?medium?size.
????else
????{????????
????????director->setContentScaleFactor(MIN(smallResolutionSize.height/designResolutionSize.height?smallResolutionSize.width/designResolutionSize.width));
????}

????register_all_packages();

????//?create?a?scene.?it‘s?an?autorelease?object
????auto?scene?=?HelloWorld::createScene();

????//?run
????director->runWithScene(scene);

????return?true;
}

//?This?function

?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2016-10-03?14:22??Classes\
?????文件????????3594??2016-09-28?17:23??Classes\AppDelegate.cpp
?????文件?????????987??2016-09-24?17:02??Classes\AppDelegate.h
?????文件????????1401??2016-10-01?21:50??Classes\golds.cpp
?????文件?????????259??2016-10-01?21:50??Classes\golds.h
?????文件????????2488??2016-10-03?00:43??Classes\HelloWorldScene.cpp
?????文件?????????506??2016-09-28?18:47??Classes\HelloWorldScene.h
?????文件?????????428??2016-09-29?11:58??Classes\heroMiner.cpp
?????文件?????????304??2016-09-28?23:08??Classes\heroMiner.h
?????文件???????15724??2016-10-03?14:11??Classes\mainGameScene.cpp
?????文件????????1779??2016-10-02?23:51??Classes\mainGameScene.h
?????文件????????4358??2016-10-02?22:51??Classes\pauseMenu.cpp
?????文件?????????832??2016-10-02?22:12??Classes\pauseMenu.h
?????文件????????2702??2016-10-02?15:41??Classes\settingMenu.cpp
?????文件?????????628??2016-09-28?18:29??Classes\settingMenu.h
?????文件?????????689??2016-09-29?12:05??Classes\startGametitle.cpp
?????文件?????????342??2016-09-29?11:58??Classes\startGametitle.h

評(píng)論

共有 條評(píng)論