var label = new cc.LabelTTF('今天天气真热',"Microsoft YaHei",30)
//label.enableStroke(cc.color(0,0,0,255),2)
label.setPosition(cc.winSize.width>>1,cc.winSize.height>>1)
label.setColor(cc.color(255,0,0,255))
this.addChild(label)
var label_1 = new cc.LabelBMFont("MUSIC1",res.mikado_fnt);
label_1.setPosition(cc.winSize.width>>1,cc.winSize.height>>1)
label_1.setColor(cc.color(0,255,0,100))
this.addChild(label_1)
schedule 定时刷新器的机制 给游戏加倒计时
scheduleUpdate 配合 update使用 update第一个参数是距离上一帧刷新的毫秒间隔
scheduleOnce 只刷新一次的定时器
schedule 设置延时的时候 取得是 delay delay设置为0.0001则可让定时器启动后立刻执行
onExit里 要清除显示对象 移除定时器this.unscheduleAllCallbacks() 清除自定义事件 置空数组
//label.enableStroke(cc.color(0,0,0,255),2)
label.setPosition(cc.winSize.width>>1,cc.winSize.height>>1)
label.setColor(cc.color(255,0,0,255))
this.addChild(label)
var label_1 = new cc.LabelBMFont("MUSIC1",res.mikado_fnt);
label_1.setPosition(cc.winSize.width>>1,cc.winSize.height>>1)
label_1.setColor(cc.color(0,255,0,100))
this.addChild(label_1)
schedule 定时刷新器的机制 给游戏加倒计时
scheduleUpdate 配合 update使用 update第一个参数是距离上一帧刷新的毫秒间隔
scheduleOnce 只刷新一次的定时器
schedule 设置延时的时候 取得是 delay delay设置为0.0001则可让定时器启动后立刻执行
onExit里 要清除显示对象 移除定时器this.unscheduleAllCallbacks() 清除自定义事件 置空数组