• 大小: 11.98MB
    文件类型: .rar
    金币: 2
    下载: 0 次
    发布日期: 2024-02-03
  • 语言: 其他
  • 标签: Cocos2d-x  

资源简介

Coco2d-x节奏大师源码,可直接运行!

资源截图

代码片段和文件信息

#include “AppDelegate.h“

#include 
#include 

#include “HelloWorldScene.h“
#include “AppMacros.h“
#include “SimpleAudioEngine.h“
USING_NS_CC;
using namespace std;
using namespace CocosDenshion;
AppDelegate::AppDelegate() {

}

AppDelegate::~AppDelegate() 
{
}

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

    pDirector->setOpenGLView(pEGLView);

    // Set the design resolution
    pEGLView->setDesignResolutionSize(designResolutionSize.width designResolutionSize.height kResolutionShowAll);

CCSize frameSize = pEGLView->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);
//
//        pDirector->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);
//
//        pDirector->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);
//
//        pDirector->setContentScaleFactor(MIN(smallResource.size.height/designResolutionSize.height smallResource.size.width/designResolutionSize.width));
//    }
//
//    // set searching path
//    CCFileUtils::sharedFileUtils()->setSearchPaths(searchPath);
//
    // turn on display FPS
    pDirector->setDisplayStats(false);

    // 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 = HelloWorld::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()-

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件     222812  2015-01-07 19:46  Rhythm-master\1.png

     文件    3921313  2015-01-07 19:46  Rhythm-master\2.gif

     文件        391  2015-01-07 19:46  Rhythm-master\README.md

     文件       3319  2015-01-07 19:46  Rhythm-master\Rhythm\Classes\AppDelegate.cpp

     文件        955  2015-01-07 19:46  Rhythm-master\Rhythm\Classes\AppDelegate.h

     文件       2765  2015-01-07 19:46  Rhythm-master\Rhythm\Classes\AppMacros.h

     文件      21061  2015-01-07 19:46  Rhythm-master\Rhythm\Classes\Game4Key.cpp

     文件       2485  2015-01-07 19:46  Rhythm-master\Rhythm\Classes\Game4Key.h

     文件       4403  2015-01-07 19:46  Rhythm-master\Rhythm\Classes\HelloWorldScene.cpp

     文件        774  2015-01-07 19:46  Rhythm-master\Rhythm\Classes\HelloWorldScene.h

     文件       1948  2015-01-07 19:46  Rhythm-master\Rhythm\Classes\VisibleRect.cpp

     文件        551  2015-01-07 19:46  Rhythm-master\Rhythm\Classes\VisibleRect.h

     文件        356  2015-01-07 19:46  Rhythm-master\Rhythm\proj.android\.classpath

     文件      10845  2015-01-07 19:46  Rhythm-master\Rhythm\proj.android\.cproject

     文件       3581  2015-01-07 19:46  Rhythm-master\Rhythm\proj.android\.project

     文件       1261  2015-01-07 19:46  Rhythm-master\Rhythm\proj.android\AndroidManifest.xml

     文件        698  2015-01-07 19:46  Rhythm-master\Rhythm\proj.android\ant.properties

     文件       3497  2015-01-07 19:46  Rhythm-master\Rhythm\proj.android\build.xml

     文件       1544  2015-01-07 19:46  Rhythm-master\Rhythm\proj.android\build_native.sh

     文件        866  2015-01-07 19:46  Rhythm-master\Rhythm\proj.android\jni\Android.mk

     文件        101  2015-01-07 19:46  Rhythm-master\Rhythm\proj.android\jni\Application.mk

     文件       1150  2015-01-07 19:46  Rhythm-master\Rhythm\proj.android\jni\hellocpp\main.cpp

     文件        781  2015-01-07 19:46  Rhythm-master\Rhythm\proj.android\proguard-project.txt

     文件        429  2015-01-07 19:46  Rhythm-master\Rhythm\proj.android\project.properties

     文件       3277  2015-01-07 19:46  Rhythm-master\Rhythm\proj.android\README.md

     文件      12200  2015-01-07 19:46  Rhythm-master\Rhythm\proj.android\res\drawable-hdpi\icon.png

     文件       5295  2015-01-07 19:46  Rhythm-master\Rhythm\proj.android\res\drawable-ldpi\icon.png

     文件       7590  2015-01-07 19:46  Rhythm-master\Rhythm\proj.android\res\drawable-mdpi\icon.png

     文件        108  2015-01-07 19:46  Rhythm-master\Rhythm\proj.android\res\values\strings.xml

     文件       1924  2015-01-07 19:46  Rhythm-master\Rhythm\proj.android\src\com\MyCompany\Rhythm\Rhythm.java

............此处省略178个文件信息

评论

共有 条评论