您的位置:首页 > 编程语言

测试反应 游戏代码 整理

2016-07-30 09:50 155 查看
flag:null,

this.flag = 0 

switch(this.flag)
{

//调用方法。让方法有循环

case 0:this.showWaite();break;
case 1:this.showToSoon();break;
case 2:this.showResult();break;
case 3:this.showWaite();break;
case 4:this.showWaite();break;
}

多次循环

 

计时器的运用

this.randomTime = Math.floor(Math.random()*10+1);
this.schedule(this.showGreen,this.randomTime,1,0); //添加定时器
 
var action = cc.sequence(cc.fadeOut(1.0),cc.fadeIn(1.0));  //淡入 淡出
 
this.removeAllChildren();//清除所有控件   //???
this.unscheduleAllCallbacks();//清除定时器
 
this.date2 = new Date();//记录点击时间
 
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: