cocoscreator TS 队列 20C
//文字按钮
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个回答

需要对动作的开始结束设置监听

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问
相关内容推荐