xxxx18一60岁hd中国/日韩女同互慰一区二区/西西人体扒开双腿无遮挡/日韩欧美黄色一级片 - 色护士精品影院www

  • 大小: 112KB
    文件類型: .zip
    金幣: 2
    下載: 0 次
    發(fā)布日期: 2021-06-09
  • 語(yǔ)言: 其他
  • 標(biāo)簽: cocos2dx??

資源簡(jiǎn)介

Vs2013+cocos2dx貪吃蛇,3個(gè)場(chǎng)景的切換,代碼有注釋

資源截圖

代碼片段和文件信息

#include?“AppDelegate.h“

#include?“HomeScene.h“

USING_NS_CC;

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)?{
????????glview?=?GLViewImpl::create(“My?Game“);
????????director->setOpenGLView(glview);
????}

????//?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);

????register_all_packages();

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

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

????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();
}

?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2016-07-10?23:57??snake\
?????文件????????1959??2016-07-11?20:43??snake\AppDelegate.cpp
?????文件?????????987??2016-07-10?02:15??snake\AppDelegate.h
?????文件??????120252??2016-07-10?11:46??snake\apple.png
?????文件????????1454??2016-07-12?00:07??snake\GameOverScene.cpp
?????文件?????????282??2016-07-11?20:55??snake\GameOverScene.h
?????文件????????6062??2016-07-11?23:50??snake\HelloWorldScene.cpp
?????文件????????1473??2016-07-12?00:07??snake\HelloWorldScene.h
?????文件????????1103??2016-07-12?00:07??snake\HomeScene.cpp
?????文件?????????180??2016-07-11?20:34??snake\HomeScene.h
?????文件????????1941??2016-07-12?00:09??snake\SnakeSprite.cpp
?????文件?????????800??2016-07-12?00:07??snake\SnakeSprite.h

評(píng)論

共有 條評(píng)論