cc.find('Canvas').runAction(cc.sequence(cc.fadeOut(1.0),cc.callFunc(function(){
cc.director.loadScene('WAR');})))
this.node.getComponent(cc.ProgressBar).progress = 。。。给进度条添加数据
this.node.on(cc.Node.EventType.TOUCH_START, function (event) { 。。。 })
给按钮添加一个点击事件
this.node.on(GameEvent.csvLoadComplete,
function(){that.pub_beginShow(GameData.player.map,
GameData.player.position)})
GameData.player.position)})
侦听自定义事件的时候,如果用函数接收,记得要用function(){}
本文介绍使用Cocos2d-x游戏引擎进行游戏开发的一些实用技巧,包括场景淡出淡入、进度条数据更新、按钮点击事件及自定义事件监听的实现方法。
7315

被折叠的 条评论
为什么被折叠?



