weixin_41775347 2018-09-11 07:41 采纳率: 0%
浏览 1375
已结题

cocoscreator TS 队列

//文字按钮
public onTextClick(event, CustomEventData): void {
    console.log('custom date=' + CustomEventData);
    if (CustomEventData === '1') {
        ComUI.showChatMessage("大家多多关照", 1.5)
    } else if (CustomEventData === '2') {
        ComUI.showChatMessage("看到没,赌神就在这里", 1.5)
    } else if (CustomEventData === '3') {
        ComUI.showChatMessage("赶紧出牌啊!", 1.5)
    } else if (CustomEventData === '4') {
        ComUI.showChatMessage("风水轮流转", 1.5)
    } else if (CustomEventData === '5') {
        ComUI.showChatMessage("怎么会这样呢?", 1.5)
    } else if (CustomEventData === '6') {
        ComUI.showChatMessage("手气怎么这么衰啊!", 1.5)
    } else if (CustomEventData === '0') {
        this.node.destroy();
    }
    this.node.destroy();
}
//表情按钮
public onEmojCliack(event,CustomEventData): void {
    console.log('custom emoj=' + CustomEventData);
    if(CustomEventData ==='01'){
        ComUI.showEmojSprite(this.emoj1)
    }else if(CustomEventData === '02'){
        ComUI.showEmojSprite(this.emoj2)
    }else if(CustomEventData === '03'){
        ComUI.showEmojSprite(this.emoj3)
    }else if(CustomEventData === '04'){
        ComUI.showEmojSprite(this.emoj4)
    }else if(CustomEventData === '05'){
        ComUI.showEmojSprite(this.emoj5)
    }else if(CustomEventData === '06'){
        ComUI.showEmojSprite(this.emoj6)
    }else if(CustomEventData === '07'){
        ComUI.showEmojSprite(this.emoj7)
    }else if(CustomEventData === '08'){
        ComUI.showEmojSprite(this.emoj8)
    }
   // this.node.destroy();
}

}
如何使用队列,实现点击后待上一个动作执行完毕在执行下一个动作,

  • 写回答

2条回答 默认 最新

  • devmiao 2018-09-11 15:27
    关注
    评论

报告相同问题?

悬赏问题

  • ¥15 程序不包含适用于入口点的静态Main方法
  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记