You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
1.1 KiB
44 lines
1.1 KiB
import User from "../../FrameWork/User/User";
|
|
import AppPlatform from "../../FrameWork/Util/AppPlatform";
|
|
import Common5 from "../../Platform/th/Common5";
|
|
|
|
|
|
const {ccclass, property} = cc._decorator;
|
|
|
|
@ccclass
|
|
export default class TaskFail extends cc.Component {
|
|
@property(cc.Label)
|
|
contentStr: cc.Label = null;
|
|
|
|
finishCallFunc = null
|
|
start () {
|
|
|
|
}
|
|
initView(str,finishCallFunc){
|
|
this.finishCallFunc = finishCallFunc
|
|
|
|
this.contentStr.string = str
|
|
}
|
|
onBtnFuHuoClick(){
|
|
let tab = {
|
|
onClose: (finish)=>{
|
|
if (finish) {
|
|
Common5.ReportDY("inLevel", '游戏任务失败-AD-复活');
|
|
this.finishCallFunc && this.finishCallFunc()
|
|
this.node.removeFromParent()
|
|
}
|
|
else{
|
|
Common5.showTips_custom("广告未观看完");
|
|
}
|
|
},onFailed:()=>{
|
|
|
|
}
|
|
}
|
|
AppPlatform.playVideo_custom(tab)
|
|
}
|
|
onBtnRestart(){
|
|
User.restartGame()
|
|
this.node.removeFromParent()
|
|
cc.director.loadScene("MainScene");
|
|
}
|
|
}
|
|
|