• 大小: 2.97MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-09-13
  • 语言: 其他
  • 标签: cocos2dx  源码  

资源简介

奇怪大冒险完整项目源码,直接导入cocos2dx引擎,编译即可

资源截图

代码片段和文件信息

#include “AboutScene.h“


AboutScene::AboutScene(void)
{
}


AboutScene::~AboutScene(void)
{
}
CCScene* AboutScene::scene()
{
CCScene * scene = NULL;
do 
{
// ‘scene‘ is an autorelease object
scene = CCScene::create();
CC_BREAK_IF(! scene);

// ‘layer‘ is an autorelease object
AboutScene *layer = AboutScene::create();
CC_BREAK_IF(! layer);

// add layer as a child to scene
scene->addChild(layer);
} while (0);

// return the scene
return scene;
}
bool AboutScene::init()
{
bool bRet = false;
do 
{CCSprite* bgSprite=CCSprite::create(“Startup_bkg_gray.jpg“);
bgSprite->setAnchorPoint(ccp(00));
bgSprite->setPosition(ccp(00));

addChild(bgSprite);

CCSprite* bgSprite2=CCSprite::create(“about.png“);
//bgSprite->setAnchorPoint(ccp(00));
CCSize size = CCDirector::sharedDirector()->getWinSize();
bgSprite2->setPosition(ccp(size.width / 2 size.height/2));

//  float a=(float)480/800;
// float b=(float)320/480;
//  bgSprite2->setScaleX((float)480/800);
//  bgSprite2->setScaleY((float)320/480);
//bgSprite2->setScaleX(0.9f);
//  bgSprite2->setScaleY(0.9f);
addChild(bgSprite2);







CCMenuItemImage *musicItem = CCMenuItemImage::create(
“Option_btn_back_zh.png“
“Option_btn_back_pressed_zh.png“
this
menu_selector(AboutScene::musicItemCallback));
musicItem->setPosition(ccp(size.width/2120));
CCMenu* pMenu = CCMenu::create(musicItem NULL);
pMenu->setPosition(CCPointZero);
addChild(pMenu);
bRet=true;

}while(0);
return bRet;

}
void AboutScene::musicItemCallback(CCobject* pSender)
{
CCDirector::sharedDirector()->popScene();
}

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

     文件       1627  2013-06-20 10:08  A173013457-27942\Classes\AboutScene.cpp

     文件        270  2013-06-19 08:48  A173013457-27942\Classes\AboutScene.h

     文件       8761  2013-06-17 21:04  A173013457-27942\Classes\AnimationManager.cpp

     文件        761  2013-06-17 20:57  A173013457-27942\Classes\AnimationManager.h

     文件       1478  2013-06-17 18:52  A173013457-27942\Classes\AppDelegate.cpp

     文件        960  2013-06-14 18:35  A173013457-27942\Classes\AppDelegate.h

     文件        590  2013-11-09 20:46  A173013457-27942\Classes\BZDMX.h

     文件       5092  2013-11-09 20:27  A173013457-27942\Classes\Controllayer.cpp

     文件        503  2013-11-09 19:53  A173013457-27942\Classes\Controllayer.h

     文件       2992  2013-11-09 20:12  A173013457-27942\Classes\Failedlayer.cpp

     文件        260  2013-06-17 11:06  A173013457-27942\Classes\Failedlayer.h

     文件       1171  2013-06-17 20:56  A173013457-27942\Classes\GameConstants.h

     文件       4451  2013-11-10 22:45  A173013457-27942\Classes\GameMap.cpp

     文件       1047  2013-11-10 22:18  A173013457-27942\Classes\GameMap.h

     文件       4127  2013-06-19 08:29  A173013457-27942\Classes\GameMenu.cpp

     文件        767  2013-06-17 16:38  A173013457-27942\Classes\GameMenu.h

     文件       4905  2013-11-09 20:17  A173013457-27942\Classes\Game_1_1.cpp

     文件        651  2013-06-19 23:18  A173013457-27942\Classes\Game_1_1.h

     文件        214  2013-06-19 22:57  A173013457-27942\Classes\Global.cpp

     文件        493  2013-06-20 14:43  A173013457-27942\Classes\Global.h

     文件       3150  2013-06-17 16:17  A173013457-27942\Classes\HelloWorldScene.cpp

     文件        737  2013-06-15 06:09  A173013457-27942\Classes\HelloWorldScene.h

     文件       7864  2013-11-10 22:34  A173013457-27942\Classes\Hero.cpp

     文件        865  2013-06-17 12:38  A173013457-27942\Classes\Hero.h

     文件        726  2013-06-20 16:30  A173013457-27942\Classes\HideScene.cpp

     文件        219  2013-06-20 14:25  A173013457-27942\Classes\HideScene.h

     文件        490  2013-06-14 18:35  A173013457-27942\Classes\resource.h

     文件       4619  2013-06-19 08:47  A173013457-27942\Classes\SettingScene.cpp

     文件        451  2013-06-17 18:13  A173013457-27942\Classes\SettingScene.h

     文件        664  2013-06-15 12:55  A173013457-27942\Classes\Singleton.h

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

评论

共有 条评论