会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
我要开发游戏
博客园
首页
新随笔
联系
管理
订阅
2018年3月2日
PuppyPie technical support
摘要: Write your questions or Suggestions here.
阅读全文
posted @ 2018-03-02 23:22 我要开发游戏
阅读(134)
评论(0)
推荐(0)
2016年1月2日
cocos2dx 音效 粒子 数据存储
摘要: 1.音效引入头文件#include "simpleAudioEngine.h"命名空间using namespace CocosDenshion; 1 //创建一个背景 2 Size winSize = Director::getInstance()->getWinSize(); 3 ...
阅读全文
posted @ 2016-01-02 12:50 我要开发游戏
阅读(237)
评论(0)
推荐(0)
2016年1月1日
cocos2dx 碰撞检测
摘要: 1 //必须 要有float类型的参数 2 void MainScene::updateFrame(float dt) 3 { 4 if (spriteTest != NULL && spriteTest->getBoundingBox().intersectsRect(sprite->g...
阅读全文
posted @ 2016-01-01 20:00 我要开发游戏
阅读(649)
评论(0)
推荐(0)
cocos2dx-触摸事件
摘要: 1 //创建一个精灵 2 Sprite *spriteTest = Sprite::create("1.png"); 3 spriteTest->setPosition(Point(100,100)); 4 this->addChild(spriteTest); 5 ...
阅读全文
posted @ 2016-01-01 15:51 我要开发游戏
阅读(384)
评论(0)
推荐(0)
2015年12月21日
cocos2dx 帧动画(iOS)
摘要: 植物大战僵尸的植物摇摆效果 1 //帧动画 2 Animation *animation = Animation::create(); 3 4 Sprite *sprite = Sprite::create("1.png"); 5 sprite->setPositi...
阅读全文
posted @ 2015-12-21 22:40 我要开发游戏
阅读(289)
评论(0)
推荐(0)
2015年12月20日
cocos2dx 动画 二(iOS)
摘要: 7.Bezier曲线需要ccBezierConfig结构体,设置2个控制点和一个结束点1 ccBezierConfig bc;2 bc.controlPoint_1 = Vec2(400,400);3 bc.controlPoint_2 = Vec2(800,200);4 bc.endPositio...
阅读全文
posted @ 2015-12-20 21:49 我要开发游戏
阅读(491)
评论(0)
推荐(0)
cocos2dx 动画 一
摘要: 1.精灵的runAction方法 1 spt = Sprite::create("pean.jpg"); 2 this->addChild(spt); 3 4 MenuItemFont *item = MenuItemFont::create("开始", [&](R...
阅读全文
posted @ 2015-12-20 15:31 我要开发游戏
阅读(213)
评论(0)
推荐(0)
cocos2dx SpriteBatchNode 精灵的渲染优化类
摘要: 用处是减少对精灵的渲染次数,用法如下1 SpriteFrameCache::getInstance()->addSpriteFramesWithFile("person.plist");2 SpriteBatchNode *node = SpriteBatchNode::create...
阅读全文
posted @ 2015-12-20 13:07 我要开发游戏
阅读(682)
评论(0)
推荐(0)
cocos2dx Sprite的多种创建方法
摘要: 1.通过文件创建Sprite *bg = Sprite::create("backGround.jpg");2.通过图片的某个区域创建1 SpriteFrame *frame = SpriteFrame::create("pean.jpg", Rect(0, 0, 300, 300));2 ...
阅读全文
posted @ 2015-12-20 10:20 我要开发游戏
阅读(816)
评论(0)
推荐(0)
2015年12月19日
cocos2dx Menu
摘要: ---恢复内容开始---cocos2dx 3.0以后 Menu相关回调函数使用不同。现在列出当前版本可使用的方法。看见一个说的很仔细的博客,博客源地址http://blog.sina.com.cn/s/blog_6d193c030101h40e.html以按钮回调为例,第二个参数MenuItemFo...
阅读全文
posted @ 2015-12-19 18:32 我要开发游戏
阅读(280)
评论(0)
推荐(0)
公告