cocos2s-x 大鱼吃小鱼
关于cocos2d-x的小游戏 分享一下
代码片段和文件信息
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2013-08-13 16:04 EatFish
文件 6148 2013-08-13 16:04 EatFish.DS_Store
目录 0 2013-08-13 16:05 __MACOSX
目录 0 2013-08-13 16:05 __MACOSXEatFish
文件 176 2013-08-13 16:04 __MACOSXEatFish._.DS_Store
目录 0 2013-08-13 16:05 EatFish.git
目录 0 2013-08-13 13:51 EatFish.gitranches
文件 138 2013-08-13 13:51 EatFish.gitconfig
文件 73 2013-08-13 13:51 EatFish.gitdescription
文件 23 2013-08-13 13:51 EatFish.gitHEAD
目录 0 2013-08-13 13:51 EatFish.githooks
文件 452 2013-08-13 13:51 EatFish.githooksapplypatch-msg.sample
文件 896 2013-08-13 13:51 EatFish.githookscommit-msg.sample
文件 189 2013-08-13 13:51 EatFish.githookspost-update.sample
文件 398 2013-08-13 13:51 EatFish.githookspre-applypatch.sample
文件 1704 2013-08-13 13:51 EatFish.githookspre-commit.sample
文件 4951 2013-08-13 13:51 EatFish.githookspre-rebase.sample
文件 1239 2013-08-13 13:51 EatFish.githooksprepare-commit-msg.sample
文件 3611 2013-08-13 13:51 EatFish.githooksupdate.sample
文件 70304 2013-08-13 14:56 EatFish.gitindex
目录 0 2013-08-13 13:51 EatFish.gitinfo
文件 35 2013-08-13 13:51 EatFish.gitinfoexclude
目录 0 2013-08-13 16:05 __MACOSXEatFish.git
目录 0 2013-08-13 16:05 __MACOSXEatFish.gitinfo
文件 171 2013-08-13 13:51 __MACOSXEatFish.gitinfo._exclude
目录 0 2013-08-13 14:55 EatFish.gitobjects
目录 0 2013-08-13 14:56 EatFish.gitobjects 0
文件 1473 2013-08-13 13:51 EatFish.gitobjects 08b8026f772525ccff6c3361ecc6f3eb43d0d82
文件 14646 2013-08-13 14:56 EatFish.gitobjects 0a54c6a259bc916cc4f26ac27957d901ca9576a
目录 0 2013-08-13 13:51 EatFish.gitobjects 1
文件 8317 2013-08-13 13:51 EatFish.gitobjects 16a37970ecab4cf29a837439d581c0fb1bf7218
............此处省略2194个文件信息
#include “AboutScene.h“
#include “HelloWorldScene.h“
using namespace cocos2d;
cocos2d::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
{
std::string titleStr = “Go!Fish!Go!
For Cocos2d-x
All the resources come
from the network
Author:northroom
Email:northroom1@gmail.com “;
CCLabelTTF* pLable = CCLabelTTF::create(titleStr.c_str() “Thonburi“ 30);
CC_BREAK_IF(!pLable);
pLable->setColor(ccBLUE);
CCSize winSize = CCDirector::sharedDirector()->getWinSize();
//pLable->setAnchorPoint(ccp(01));
pLable->setPosition(ccp(winSize.width/2winSize.height/2));
this->addChild(pLable1);
std::string str;
str=“Back“;
CCMenuItemFont* backMenu = CCMenuItemFont::create(str.c_str()thismenu_selector(AboutScene::backCallback));
CCMenu* mn = CCMenu::create(backMenuNULL);
mn->setPosition(ccp(00));
backMenu->setAnchorPoint(ccp(10));
backMenu->setPosition(ccp(winSize.width0));
this->addChild(mn1);
bRet = true;
} while (0);
return(bRet);
}
void AboutScene::backCallback(cocos2d::CCobject* pSender)
{
CCScene * scene=HelloWorld::scene();
CCDirector::sharedDirector()->replaceScene(CCTransitionFlipX::create(1.2fscene));
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2013-08-13 16:04 EatFish
文件 6148 2013-08-13 16:04 EatFish.DS_Store
目录 0 2013-08-13 16:05 __MACOSX
目录 0 2013-08-13 16:05 __MACOSXEatFish
文件 176 2013-08-13 16:04 __MACOSXEatFish._.DS_Store
目录 0 2013-08-13 16:05 EatFish.git
目录 0 2013-08-13 13:51 EatFish.gitranches
文件 138 2013-08-13 13:51 EatFish.gitconfig
文件 73 2013-08-13 13:51 EatFish.gitdesc
文件 23 2013-08-13 13:51 EatFish.gitHEAD
目录 0 2013-08-13 13:51 EatFish.githooks
文件 452 2013-08-13 13:51 EatFish.githooksapplypatch-msg.sample
文件 896 2013-08-13 13:51 EatFish.githookscommit-msg.sample
文件 189 2013-08-13 13:51 EatFish.githookspost-update.sample
文件 398 2013-08-13 13:51 EatFish.githookspre-applypatch.sample
文件 1704 2013-08-13 13:51 EatFish.githookspre-commit.sample
文件 4951 2013-08-13 13:51 EatFish.githookspre-reba
文件 1239 2013-08-13 13:51 EatFish.githooksprepare-commit-msg.sample
文件 3611 2013-08-13 13:51 EatFish.githooksupdate.sample
文件 70304 2013-08-13 14:56 EatFish.gitindex
目录 0 2013-08-13 13:51 EatFish.gitinfo
文件 35 2013-08-13 13:51 EatFish.gitinfoexclude
目录 0 2013-08-13 16:05 __MACOSXEatFish.git
目录 0 2013-08-13 16:05 __MACOSXEatFish.gitinfo
文件 171 2013-08-13 13:51 __MACOSXEatFish.gitinfo._exclude
目录 0 2013-08-13 14:55 EatFish.gitob
目录 0 2013-08-13 14:56 EatFish.gitob
文件 1473 2013-08-13 13:51 EatFish.gitob
文件 14646 2013-08-13 14:56 EatFish.gitob
目录 0 2013-08-13 13:51 EatFish.gitob
文件 8317 2013-08-13 13:51 EatFish.gitob
............此处省略2194个文件信息
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。
评论列表(条)