摘要: 添加动画(两种) ///////// 添加帧动画(每一副图加载) /////////// // 添加一个精灵用于执行帧动画 Sprite *sprite = Sprite::create("grossini_dance_01.png"); sprite->setPosition(Vec2(visib... 阅读全文
posted @ 2015-06-06 07:26 silent-bobo 阅读(290) 评论(0) 推荐(0) 编辑
摘要: Follow 在地图中使地图和人物一起运动 1 bool HelloWorld::init() 2 { 3 ////////////////////////////// 4 // 1. super init first 5 if ( !Layer::init() ) 6 ... 阅读全文
posted @ 2015-06-05 21:59 silent-bobo 阅读(286) 评论(0) 推荐(0) 编辑
摘要: 动作加速度Speed 1 ////////////////// 动作加速度Speed /////////////// 2 3 Sprite* sprite = Sprite::create("button.png"); 4 sprite->setPosition(Ve... 阅读全文
posted @ 2015-06-05 21:29 silent-bobo 阅读(319) 评论(0) 推荐(0) 编辑
摘要: 动作回调函数 (例子) 1 bool HelloWorld::init() 2 { 3 ////////////////////////////// 4 // 1. super init first 5 if ( !Layer::init() ) 6 { 7 ... 阅读全文
posted @ 2015-06-05 21:21 silent-bobo 阅读(1340) 评论(0) 推荐(0) 编辑
摘要: 精灵沿着正方形路线运动暂停2秒后然后再将自己放大4倍 1 ////////////// CardinalSpline 样条曲线 /////////////// 2 3 Sprite* sprite = Sprite::create("button.png");... 阅读全文
posted @ 2015-06-05 20:17 silent-bobo 阅读(212) 评论(0) 推荐(0) 编辑
摘要: CardinalSpline样条曲线(沿着正方形路线走) 1 ////////////// CardinalSpline 样条曲线 /////////////// 2 3 Sprite* sprite = Sprite::create("button.png"); 4... 阅读全文
posted @ 2015-06-05 20:01 silent-bobo 阅读(1707) 评论(0) 推荐(0) 编辑
摘要: cocos2dx 3.2 Scale9Sprite点九图本文部分转载至 cocos2dx 3.x Scale9Sprite的认识 1. Scale9Sprite 认识Scale9Sprite 是一张可拉伸的精灵。只要给他设置一下大小,它就能自动拉伸。2.Scale9Sprite的使用 1 #inc... 阅读全文
posted @ 2015-06-05 15:48 silent-bobo 阅读(1121) 评论(0) 推荐(0) 编辑
摘要: Label(标签)Cocos2d-x中提供了Label(标签)对象来创建TTF、BMFont和SystemFont文本。Label BMFont(BMFont标签)BMFont是使用位图字体的标签类型。位图字体是由点或像素矩阵所组成,这些点和像素代表了字符图形的外形和大小。位图字体的使用很方便也很容... 阅读全文
posted @ 2015-05-29 08:34 silent-bobo 阅读(767) 评论(0) 推荐(0) 编辑
摘要: 使用cocos制作一个简易的小闹钟本文转载至 学习使用Cocos制作《闹钟》使用的引擎版本是cocos2.1具体开发过程指导(1)Cocos Studio部分1.打开Cocos工具,新建一个项目:2.设置好相关的配置,点击完成,从而发布到Cocos Studio中:3.Cocos Studio ID... 阅读全文
posted @ 2015-05-26 16:58 silent-bobo 阅读(1655) 评论(0) 推荐(0) 编辑
摘要: cocos2d-x-3.2 cpp-empty-test代码注释AppDelegate.cpp 1 #include "AppDelegate.h" 2 3 #include 4 #include 5 6 #include "HelloWorldScene.h" 7 #incl... 阅读全文
posted @ 2015-05-25 12:34 silent-bobo 阅读(304) 评论(0) 推荐(0) 编辑