上一页 1 ··· 29 30 31 32 33 34 35 36 37 ··· 43 下一页
摘要: cd E:\cocos2d-x-2.2.3\tools\project-creatorE:@echo off set /p projectName=请输入项目名称: if "%projectName%"=="" goto inputError set /p packageName=请输入包标示名: if "%packageName%"=="" goto inputError python create_project.py -project %projectName% -package %packageName% 阅读全文
posted @ 2014-04-04 14:34 yufenghou 阅读(289) 评论(0) 推荐(0)
摘要: CCSprite* sp1=CCSprite::create("s_1.png"); sp1->setPosition(ccp(size.width/2,size.height/2)); addChild(sp1); CCSprite* sp2=CCSprite::create("s_2.png"); sp2->setPosition(ccp(size.width/2,size.height/2)); addChild(sp2); if(sp1->boundingBox().intersectsRect(sp2->bounding 阅读全文
posted @ 2014-04-04 12:13 yufenghou 阅读(180) 评论(0) 推荐(0)
摘要: // 在init这个函数当中做一些初始化的事情bool HelloWorld::init(){ ////////////////////////////// // 先构造父级对象 if ( !CCLayer::init() ) { return false; } CCSize size=CCDirector::sharedDirector()->getWinSize(); CCMenuItemFont* item=CCMenuItemFont::create("click me",this,menu_selector(HelloWorl... 阅读全文
posted @ 2014-04-04 11:16 yufenghou 阅读(147) 评论(0) 推荐(0)
摘要: CCLabelBMFont* label=CCLabelBMFont::create("llala","font/myFont.fnt");label->setPosition(ccp(size.width,size.height));this->addChild(label); 阅读全文
posted @ 2014-04-04 10:10 yufenghou 阅读(277) 评论(0) 推荐(0)
摘要: 构造方法执行完以后,init方法会自动执行 阅读全文
posted @ 2014-04-04 07:50 yufenghou 阅读(196) 评论(0) 推荐(0)
摘要: //在test当中有很多的例子可以尝试 CCSprite* sprite=CCSprite::create("s_hurt.png"); sprite->setPosition(ccp(size.width/2,size.height/2)); this->addChild(sprite); CCGridAction* action=CCShaky3D::create(5.0f,ccp(5,5),5,false); sprite->runAction(action); 阅读全文
posted @ 2014-04-03 16:13 yufenghou 阅读(191) 评论(0) 推荐(0)
摘要: CCProgressTo* to=CCProgressTo::create(5.0f,100); CCProgressTimer* time=CCProgressTimer::create(CCSprite::create("s_hurt.png")); time->setPosition(ccp(size.width/2,size.height/2)); addChild(time); time->setType(kCCProgressTimerTypeRadial); time->runAction(to); //加上这段代码,技能冷却的事件更完... 阅读全文
posted @ 2014-04-03 08:40 yufenghou 阅读(179) 评论(0) 推荐(0)
摘要: CCSpriteFrameCache* spriteCache=CCSpriteFrameCache::sharedSpriteFrameCache(); spriteCache->addSpriteFramesWithFile("girls.plist"); CCSprite* sp=CCSprite::createWithSpriteFrameName("s_1.png"); sp->setPosition(ccp(size.height*0.2,size.height/2)); sp->setScale(0); this-> 阅读全文
posted @ 2014-04-03 08:06 yufenghou 阅读(361) 评论(0) 推荐(0)
摘要: CCSize size=CCDirector::sharedDirector()->getWinSize(); CCSprite* sprite=CCSprite::create("s_1.png"); sprite->setPosition(ccp(size.width/2,size.height/2)); this->addChild(sprite); CCAnimation* animation=CCAnimation::create(); char str[50]; for(int i=1;iaddSpriteFrameWithFileNa... 阅读全文
posted @ 2014-04-02 11:52 yufenghou 阅读(182) 评论(0) 推荐(0)
摘要: 1.选择 配置属性->链接器->调试->生成调试信息 改为 是2.选择 配置属性->C/C++ ->常规->调试信息格式 改为 用于“编辑并继续”的程序数据库(/ZI)3.选择 配置属性->C/C++ ->优化->优化 改为 禁用(/Od) 阅读全文
posted @ 2014-03-30 21:02 yufenghou 阅读(270) 评论(0) 推荐(0)
上一页 1 ··· 29 30 31 32 33 34 35 36 37 ··· 43 下一页