• 大小: 5.92MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-10-31
  • 语言: 其他
  • 标签: cocos  

资源简介

cocos热更新demo

资源截图

代码片段和文件信息

#include “AppDelegate.h“
#include “Updatelayer.h“

USING_NS_CC;

AppDelegate::AppDelegate() {

}

AppDelegate::~AppDelegate() 
{
}

bool AppDelegate::applicationDidFinishLaunching() {
    // initialize director
    CCDirector* pDirector = CCDirector::sharedDirector();
    CCEGLView* pEGLView = CCEGLView::sharedOpenGLView();

    pDirector->setOpenGLView(pEGLView);

pEGLView->setDesignResolutionSize(480 320 kResolutionShowAll);

    // 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 = HotUpdaterTest::scene();
CCScene *pScene = Updatelayer::scene();

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

// this function will be called when the app is active again
void AppDelegate::applicationWillEnterForeground() {
    CCDirector::sharedDirector()->startAnimation();

    // if you use SimpleAudioEngine it must resume here
    // SimpleAudioEngine::sharedEngine()->resumeBackgroundMusic();
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2016-07-08 17:06  Cocos2d-x_HotUpdate-master\
     文件       10244  2016-07-21 14:34  Cocos2d-x_HotUpdate-master\.DS_Store
     目录           0  2016-07-22 11:27  __MACOSX\
     目录           0  2016-07-22 11:27  __MACOSX\Cocos2d-x_HotUpdate-master\
     文件         120  2016-07-21 14:34  __MACOSX\Cocos2d-x_HotUpdate-master\._.DS_Store
     文件         141  2015-01-02 09:27  Cocos2d-x_HotUpdate-master\.gitignore
     文件         212  2015-01-02 09:27  __MACOSX\Cocos2d-x_HotUpdate-master\._.gitignore
     目录           0  2016-07-08 17:06  Cocos2d-x_HotUpdate-master\Classes\
     文件        6148  2016-07-21 14:36  Cocos2d-x_HotUpdate-master\Classes\.DS_Store
     目录           0  2016-07-22 11:27  __MACOSX\Cocos2d-x_HotUpdate-master\Classes\
     文件         120  2016-07-21 14:36  __MACOSX\Cocos2d-x_HotUpdate-master\Classes\._.DS_Store
     文件        1445  2015-01-02 09:27  Cocos2d-x_HotUpdate-master\Classes\AppDelegate.cpp
     文件         212  2015-01-02 09:27  __MACOSX\Cocos2d-x_HotUpdate-master\Classes\._AppDelegate.cpp
     文件         955  2015-01-02 09:27  Cocos2d-x_HotUpdate-master\Classes\AppDelegate.h
     文件         212  2015-01-02 09:27  __MACOSX\Cocos2d-x_HotUpdate-master\Classes\._AppDelegate.h
     文件        2765  2015-01-02 09:27  Cocos2d-x_HotUpdate-master\Classes\AppMacros.h
     文件         212  2015-01-02 09:27  __MACOSX\Cocos2d-x_HotUpdate-master\Classes\._AppMacros.h
     文件        2750  2015-01-02 09:27  Cocos2d-x_HotUpdate-master\Classes\HelloWorldScene.cpp
     文件         212  2015-01-02 09:27  __MACOSX\Cocos2d-x_HotUpdate-master\Classes\._HelloWorldScene.cpp
     文件         737  2015-01-02 09:27  Cocos2d-x_HotUpdate-master\Classes\HelloWorldScene.h
     文件         212  2015-01-02 09:27  __MACOSX\Cocos2d-x_HotUpdate-master\Classes\._HelloWorldScene.h
     文件        5385  2015-01-02 09:27  Cocos2d-x_HotUpdate-master\Classes\Updatelayer.cpp
     文件         212  2015-01-02 09:27  __MACOSX\Cocos2d-x_HotUpdate-master\Classes\._Updatelayer.cpp
     文件        1349  2015-01-02 09:27  Cocos2d-x_HotUpdate-master\Classes\Updatelayer.h
     文件         212  2015-01-02 09:27  __MACOSX\Cocos2d-x_HotUpdate-master\Classes\._Updatelayer.h
     文件         212  2016-07-08 17:06  __MACOSX\Cocos2d-x_HotUpdate-master\._Classes
     目录           0  2015-01-02 09:27  Cocos2d-x_HotUpdate-master\proj.android\
     文件         466  2015-01-02 09:27  Cocos2d-x_HotUpdate-master\proj.android\.classpath
     目录           0  2016-07-22 11:27  __MACOSX\Cocos2d-x_HotUpdate-master\proj.android\
     文件         212  2015-01-02 09:27  __MACOSX\Cocos2d-x_HotUpdate-master\proj.android\._.classpath
     文件        3595  2015-01-02 09:27  Cocos2d-x_HotUpdate-master\proj.android\.project
............此处省略417个文件信息

评论

共有 条评论