资源简介
超级玛丽cocos2d-x C++版,cocos2d-x 2.2.x版本
代码片段和文件信息
#include “cocos2d.h“
#include “CCEGLView.h“
#include “AppDelegate.h“
#include “GameScene.h“
#include “SimpleAudioEngine.h“
using namespace CocosDenshion;
USING_NS_CC;
AppDelegate::AppDelegate()
{
}
AppDelegate::~AppDelegate()
{
SimpleAudioEngine::end();
}
bool AppDelegate::applicationDidFinishLaunching()
{
// initialize director
CCDirector *pDirector = CCDirector::sharedDirector();
pDirector->setOpenGLView(CCEGLView::sharedOpenGLView());
// turn on display FPS
pDirector->setDisplayStats(true);
// set FPS. the default value is 1.0/60 if you don‘t call this
pDirector->setAnimationInterval(1.0 / 60);
// create a scene. it‘s an autorelease object
CCScene *pScene = GameScene::create();
// 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();
SimpleAudioEngine::sharedEngine()->pauseBackgroundMusic();
}
// this function will be called when the app is active again
void AppDelegate::applicationWillEnterForeground()
{
CCDirector::sharedDirector()->startAnimation();
SimpleAudioEngine::sharedEngine()->resumeBackgroundMusic();
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
.CA.... 1312 2013-09-17 12:25 SuperMarioDemo\Classes\AppDelegate.cpp
.CA.... 960 2013-09-16 16:39 SuperMarioDemo\Classes\AppDelegate.h
.CA.... 4170 2013-09-18 13:41 SuperMarioDemo\Classes\Gamela
.CA.... 875 2013-09-18 12:32 SuperMarioDemo\Classes\Gamela
.CA.... 102139 2013-09-18 13:20 SuperMarioDemo\proj.win32\Debug.win32\AppDelegate.obj
.CA.... 21890 2013-09-18 14:23 SuperMarioDemo\proj.win32\Debug.win32\cl.command.1.tlog
.CA.... 416758 2013-09-18 14:23 SuperMarioDemo\proj.win32\Debug.win32\CL.read.1.tlog
.CA.... 20566 2013-09-18 14:23 SuperMarioDemo\proj.win32\Debug.win32\CL.write.1.tlog
.CA.... 111214 2013-09-16 21:03 SuperMarioDemo\proj.win32\Debug.win32\GameButton.obj
.CA.... 113179 2013-09-18 13:41 SuperMarioDemo\proj.win32\Debug.win32\Gamela
.CA.... 119225 2013-09-18 13:20 SuperMarioDemo\proj.win32\Debug.win32\GameScene.obj
.CA.... 132352 2013-09-17 11:05 SuperMarioDemo\proj.win32\Debug.win32\GameSecne.obj
.CA.... 2 2013-09-18 14:23 SuperMarioDemo\proj.win32\Debug.win32\li
.CA.... 2 2013-09-18 14:23 SuperMarioDemo\proj.win32\Debug.win32\li
.CA.... 2 2013-09-18 14:23 SuperMarioDemo\proj.win32\Debug.win32\li
.CA.... 2 2013-09-18 14:23 SuperMarioDemo\proj.win32\Debug.win32\li
.CA.... 2 2013-09-18 14:23 SuperMarioDemo\proj.win32\Debug.win32\li
.CA.... 2 2013-09-18 14:23 SuperMarioDemo\proj.win32\Debug.win32\li
.CA.... 2 2013-09-18 14:23 SuperMarioDemo\proj.win32\Debug.win32\li
.CA.... 2 2013-09-18 14:23 SuperMarioDemo\proj.win32\Debug.win32\li
.CA.... 2 2013-09-18 14:23 SuperMarioDemo\proj.win32\Debug.win32\li
.CA.... 2 2013-09-18 14:23 SuperMarioDemo\proj.win32\Debug.win32\li
.CA.... 2 2013-09-18 14:23 SuperMarioDemo\proj.win32\Debug.win32\li
.CA.... 2 2013-09-18 14:23 SuperMarioDemo\proj.win32\Debug.win32\li
.CA.... 2 2013-09-18 14:23 SuperMarioDemo\proj.win32\Debug.win32\li
.CA.... 2 2013-09-18 14:23 SuperMarioDemo\proj.win32\Debug.win32\li
.CA.... 2 2013-09-18 14:23 SuperMarioDemo\proj.win32\Debug.win32\li
.CA.... 2 2013-09-18 14:23 SuperMarioDemo\proj.win32\Debug.win32\li
.CA.... 2 2013-09-18 14:23 SuperMarioDemo\proj.win32\Debug.win32\li
.CA.... 2 2013-09-18 14:23 SuperMarioDemo\proj.win32\Debug.win32\li
............此处省略109个文件信息
评论
共有 条评论