2015年12月5日
摘要: 其实就是接着动作操作,反正移动而已。 1 bool HelloWorld::init() 2 { 3 if (!Layer::init()) 4 { 5 return false; 6 } 7 8 Size visibleSize = Director::getInstance()->getVis... 阅读全文
posted @ 2015-12-05 22:43 四月厨 阅读(353) 评论(0) 推荐(0) 编辑
摘要: 还是老地方。。。详见操作(1)这个是将对象进行一定的移动的。 1 bool HelloWorld::init() 2 { 3 if (!Layer::init()) 4 { 5 return false; 6 } 7 8 Size visibleSize = Director::getInstan... 阅读全文
posted @ 2015-12-05 22:29 四月厨 阅读(159) 评论(0) 推荐(0) 编辑
摘要: 听说cocos场景切换比较帅气,就在网上查了许多场景切换可以调用的。先说怎么弄,贴代码,在上一节所示的地方 1 bool HelloWorld::init() 2 { 3 4 if (!Layer::init()) 5 { 6 return false; 7 } 8 9 Size visible... 阅读全文
posted @ 2015-12-05 21:32 四月厨 阅读(336) 评论(0) 推荐(1) 编辑
摘要: 首先建立一个新的类,把它称作ImageScene,放在Classes之中然后这里贴一下代码:头文件: 1 ImageScene.h 2 3 #include 4 #include 5 USING_NS_CC; 6 7 class ImageScene :public Layer{ 8 pub... 阅读全文
posted @ 2015-12-05 20:55 四月厨 阅读(259) 评论(0) 推荐(0) 编辑
摘要: 老地方改,详见操作(1)~菜单说白了就是点击设置好的地方会切换一个场景,松开之后会切换回来。将HelloWorldScene,cpp里的 1 bool HelloWorld::init() 2 3 { 4 5 if(!Layer::init()) 6 7 { 8 9 retu... 阅读全文
posted @ 2015-12-05 17:57 四月厨 阅读(166) 评论(0) 推荐(0) 编辑
  2015年12月4日
摘要: 老地方改,详见操作(1)~将HelloWorldScene,cpp里的bool HelloWorld::init(){ if(!Layer::init()) { return false; } Size size = Director::getInstance()->getVisi... 阅读全文
posted @ 2015-12-04 21:47 四月厨 阅读(125) 评论(0) 推荐(0) 编辑
摘要: 消息弹窗利用 将HelloWorldScene,cpp里的 1 bool HelloWorld::init() 2 3 { 4 5 if(!Layer::init()) 6 7 { 8 9 return false;10 11 }12 13 Message("内容"... 阅读全文
posted @ 2015-12-04 21:17 四月厨 阅读(127) 评论(0) 推荐(0) 编辑
摘要: 接第操作(1)1 Sprite *s = Sprite::create("");2 3 s->setAnchorPoint(Point(0,0));//定义0,0点4 5 s->setPosition(Point(100,200));//设置位置6 7 addChild(s);还有许多的功能去文档里... 阅读全文
posted @ 2015-12-04 18:11 四月厨 阅读(94) 评论(0) 推荐(0) 编辑
摘要: 将HelloWorldScene,cpp里的 1 bool HelloWorld::init() //找到这个 2 3 { 4 5 if(!Layer::init()) 6 7 { 8 9 return false;10 11 }12 13 //中间全部删除14... 阅读全文
posted @ 2015-12-04 17:43 四月厨 阅读(149) 评论(0) 推荐(0) 编辑
摘要: 关于界面大小的改变,简单的加入一个操作就行了。glview->setFrameSize(480,480);加入到这个底下,就是简单的改变屏幕大小。 阅读全文
posted @ 2015-12-04 17:32 四月厨 阅读(402) 评论(0) 推荐(0) 编辑