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

资源简介

使用cocos2d-x 技术制作了一款个人简历app,如果要从事cocos游戏开发,那么从自己的专业出发,向面试官展示自己的技术的一种方式。目前只设计了基本信息的内容,其他部分留白,可以自己设计个人风格,文件中包含app文件一个,cocos源码及资源文件

资源截图

代码片段和文件信息

#include “AppDelegate.h“
#include “HelloWorldScene.h“
#include “MenuScene.h“

USING_NS_CC;

static cocos2d::Size designResolutionSize = cocos2d::Size(400 600);
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(“app“ Rect(0 0 designResolutionSize.width designResolutionSize.height));
#else
        glview = GLViewImpl::create(“app“);
#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.0 / 60);

    // Set the design resolution
    glview->setDesignResolutionSize(designResolutionSize.width designResolutionSize.height ResolutionPolicy::EXACT_FIT);
    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 f

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

     文件    6955894  2017-08-25 20:11  个人简历app源码\app-debug.apk

     文件       3601  2017-08-25 19:33  个人简历app源码\Classes\AppDelegate.cpp

     文件        987  2017-08-20 15:45  个人简历app源码\Classes\AppDelegate.h

     文件       4151  2017-07-19 14:17  个人简历app源码\Classes\CardSprite.cpp

     文件        485  2017-07-19 09:21  个人简历app源码\Classes\CardSprite.h

     文件      10432  2017-08-24 19:35  个人简历app源码\Classes\HelloWorldScene.cpp

     文件        488  2017-08-24 15:01  个人简历app源码\Classes\HelloWorldScene.h

     文件       9729  2017-08-25 16:58  个人简历app源码\Classes\MenuScene.cpp

     文件        519  2017-08-25 16:24  个人简历app源码\Classes\MenuScene.h

     文件       1729  2017-07-19 09:29  个人简历app源码\Classes\ScoreBroad.cpp

     文件        621  2017-07-19 09:28  个人简历app源码\Classes\ScoreBroad.h

     文件       7526  2017-08-25 16:34  个人简历app源码\Classes\simpleScene.cpp

     文件        840  2017-08-25 16:33  个人简历app源码\Classes\simpleScene.h

     文件       2852  2017-08-24 18:56  个人简历app源码\Resources\back.png

     文件     235888  2017-08-23 21:19  个人简历app源码\Resources\bg.png

     文件       3596  2017-08-20 15:45  个人简历app源码\Resources\CloseNormal.png

     文件       2810  2017-08-20 15:45  个人简历app源码\Resources\CloseSelected.png

     文件     778552  2017-08-20 15:45  个人简历app源码\Resources\fonts\arial.ttf

     文件      25776  2017-08-20 15:45  个人简历app源码\Resources\fonts\Marker Felt.ttf

     文件      37864  2017-08-20 15:45  个人简历app源码\Resources\HelloWorld.png

     文件        504  2017-08-25 09:32  个人简历app源码\Resources\jbxx\line.png

     文件       6249  2017-08-24 20:09  个人简历app源码\Resources\jbxx\logo.png

     文件       2283  2017-08-25 10:10  个人简历app源码\Resources\jbxx\wenz_1.png

     文件        145  2017-08-25 10:28  个人简历app源码\Resources\jbxx\wenz_10.png

     文件       2053  2017-08-25 10:19  个人简历app源码\Resources\jbxx\wenz_11.png

     文件       3186  2017-08-25 10:56  个人简历app源码\Resources\jbxx\wenz_12.png

     文件        145  2017-08-25 10:28  个人简历app源码\Resources\jbxx\wenz_2.png

     文件       1372  2017-08-25 10:15  个人简历app源码\Resources\jbxx\wenz_3.png

     文件       2565  2017-08-25 10:15  个人简历app源码\Resources\jbxx\wenz_4.png

     文件       2545  2017-08-25 10:17  个人简历app源码\Resources\jbxx\wenz_5.png

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

评论

共有 条评论