摘要: 滚动的背景1. 先创建两个背景图片,并添加到一个表中 1 -- 创建一个滚动的背景 2 function GameScene:createBackground( ) 3 -- body 4 -- 创建一个背景1 5 local background1 = display.n... 阅读全文
posted @ 2015-09-18 10:38 silent-bobo 阅读(255) 评论(0) 推荐(0) 编辑
摘要: 跳转场景1 app:enterScene("GameScene", nil, "SLIDEINT", 1.0)2 app:enterScene("GameScene", nil, "FADE", 1.0)3 app:enterScene("GameScene", nil, "MOVEINB", 1.... 阅读全文
posted @ 2015-09-18 02:08 silent-bobo 阅读(683) 评论(0) 推荐(0) 编辑
摘要: 添加按钮1. 1 -- 添加一个按钮 2 cc.ui.UIPushButton.new( { normal = "image/button/start1.png", pressed = "image/button/start2.png" } ) 3 -- 点击 4 ... 阅读全文
posted @ 2015-09-18 01:43 silent-bobo 阅读(807) 评论(0) 推荐(0) 编辑
摘要: 添加标题,并上下运动 1 -- 添加一个标题的图片精灵 2 local title = display.newSprite( "image/title.png" ) 3 :pos( display.cx, display,cy ) 4 :addTo( self ) 5 6 -- 动... 阅读全文
posted @ 2015-09-18 00:47 silent-bobo 阅读(282) 评论(0) 推荐(0) 编辑
摘要: 创建一个背景1 display.newSprite("image/main.png")2 :pos(display.cx, display.cy)3 :addTo(self)4 5 pos : 位置6 addTo : 添加到场景中 阅读全文
posted @ 2015-09-18 00:28 silent-bobo 阅读(190) 评论(0) 推荐(0) 编辑