资源简介

拼图游戏,一共四关,运用了一些特效,逻辑和视图的代码基本分离。

资源截图

代码片段和文件信息

#include “AppDelegate.h“
#include “GameScene.h“
#include “StartScene.h“
#include “SimpleAudioEngine.h“

USING_NS_CC;

AppDelegate::AppDelegate() {

}

AppDelegate::~AppDelegate() 
{
}

void AppDelegate::initGLContextAttrs()
{
    //set OpenGL context attributionsnow can only set six attributions:
    //redgreenbluealphadepthstencil
    GLContextAttrs glContextAttrs = {8 8 8 8 24 8};

    GLView::setGLContextAttrs(glContextAttrs);
}

bool AppDelegate::applicationDidFinishLaunching() {
    // initialize director
    auto director = Director::getInstance();
    auto glview = director->getOpenGLView();
    if(!glview) {
        glview = GLViewImpl::create(“Puzzle“); 
glview->setframeSize(400700);
        director->setOpenGLView(glview);
    }

auto screenSize = glview->getframeSize();
Size designSize;
designSize.width = 400;
designSize.height = screenSize.height * 400 / screenSize.width;
glview->setDesignResolutionSize(designSize.width designSize.height ResolutionPolicy::SHOW_ALL);


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

// audio effect
CocosDenshion::SimpleAudioEngine::getInstance()->preloadEffect(“sounds/victory.mp3“);
CocosDenshion::SimpleAudioEngine::getInstance()->preloadEffect(“sounds/start.wav“);
CocosDenshion::SimpleAudioEngine::getInstance()->preloadEffect(“sounds/level.wav“);

auto myScene = StartScene::createScene();

// running scene
director->runWithScene(myScene);

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

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

     文件       2273  2015-05-26 19:08  cocos2dx 3.4 拼图游戏 源代码\Classes\AppDelegate.cpp

     文件       1053  2015-03-18 10:08  cocos2dx 3.4 拼图游戏 源代码\Classes\AppDelegate.h

     文件      16347  2015-05-26 20:53  cocos2dx 3.4 拼图游戏 源代码\Classes\GameScene.cpp

     文件       1730  2015-05-26 20:45  cocos2dx 3.4 拼图游戏 源代码\Classes\GameScene.h

     文件       5752  2015-05-26 12:06  cocos2dx 3.4 拼图游戏 源代码\Classes\LevelScene.cpp

     文件        637  2015-05-25 21:17  cocos2dx 3.4 拼图游戏 源代码\Classes\LevelScene.h

     文件       2211  2015-05-26 12:05  cocos2dx 3.4 拼图游戏 源代码\Classes\StartScene.cpp

     文件        353  2015-05-24 17:03  cocos2dx 3.4 拼图游戏 源代码\Classes\StartScene.h

     文件      50468  2009-06-11 04:43  cocos2dx 3.4 拼图游戏 源代码\Resources\fonts\ahronbd.ttf

     文件     778552  2015-03-12 17:06  cocos2dx 3.4 拼图游戏 源代码\Resources\fonts\arial.ttf

     文件      25776  2015-03-12 17:06  cocos2dx 3.4 拼图游戏 源代码\Resources\fonts\Marker Felt.ttf

     文件     121344  2015-05-26 18:53  cocos2dx 3.4 拼图游戏 源代码\Resources\game.exe

     文件     331776  2015-02-01 07:23  cocos2dx 3.4 拼图游戏 源代码\Resources\glew32.dll

     文件     888832  2015-02-01 07:23  cocos2dx 3.4 拼图游戏 源代码\Resources\iconv.dll

     文件     536149  2015-05-24 16:33  cocos2dx 3.4 拼图游戏 源代码\Resources\img\background.png

     文件       3951  2015-05-21 21:13  cocos2dx 3.4 拼图游戏 源代码\Resources\img\box.png

     文件       6311  2014-06-06 13:18  cocos2dx 3.4 拼图游戏 源代码\Resources\img\CloseNormal.png

     文件       5499  2014-06-06 13:18  cocos2dx 3.4 拼图游戏 源代码\Resources\img\CloseSelected.png

     文件     464462  2015-05-24 23:13  cocos2dx 3.4 拼图游戏 源代码\Resources\img\Clover.png

     文件      24965  2015-05-25 16:45  cocos2dx 3.4 拼图游戏 源代码\Resources\img\Enter.png

     文件      25500  2015-05-25 16:45  cocos2dx 3.4 拼图游戏 源代码\Resources\img\Enter2.png

     文件     259222  2015-05-21 20:59  cocos2dx 3.4 拼图游戏 源代码\Resources\img\game.png

     文件     542946  2015-05-22 22:23  cocos2dx 3.4 拼图游戏 源代码\Resources\img\level_1.png

     文件     267175  2015-05-22 22:14  cocos2dx 3.4 拼图游戏 源代码\Resources\img\level_2.png

     文件     330481  2015-05-24 22:43  cocos2dx 3.4 拼图游戏 源代码\Resources\img\level_3.png

     文件     377945  2015-05-24 22:53  cocos2dx 3.4 拼图游戏 源代码\Resources\img\level_4.png

     文件      25172  2015-05-25 17:51  cocos2dx 3.4 拼图游戏 源代码\Resources\img\next.png

     文件      25490  2015-05-25 17:52  cocos2dx 3.4 拼图游戏 源代码\Resources\img\next2.png

     文件       7779  2015-05-01 16:20  cocos2dx 3.4 拼图游戏 源代码\Resources\img\return.png

     文件       7824  2015-05-01 22:28  cocos2dx 3.4 拼图游戏 源代码\Resources\img\return2.png

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

评论

共有 条评论