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.
57 lines
1.9 KiB
57 lines
1.9 KiB
|
|
import User from "../../../FrameWork/User/User";
|
|
import AppPlatform from "../../../FrameWork/Util/AppPlatform";
|
|
import Common5 from "../../../Platform/th/Common5";
|
|
import TaskManager from "../../JuQingChat/TaskManager";
|
|
import UserManager from "../../Manager/UserManager";
|
|
import PrefabManage from "../../PrefabManager/PrefabManage";
|
|
import GameBase from "../../SCommon/GameBase";
|
|
|
|
const { ccclass, property } = cc._decorator;
|
|
|
|
@ccclass
|
|
export default class LiXianShouYi extends GameBase {
|
|
|
|
@property(cc.Label)
|
|
moneyStr: cc.Label = null
|
|
|
|
curMoney = 0
|
|
|
|
onLoad() {
|
|
super.onLoad()
|
|
}
|
|
initView(money){
|
|
this.curMoney = money
|
|
|
|
this.moneyStr.string = `${Common5.getNumberChangeHanzi(this.curMoney, '1')}`
|
|
}
|
|
onBtnClickLingQu(){
|
|
UserManager.addMoney(this.curMoney)
|
|
PrefabManage.showTextTips(`获得${Common5.getNumberChangeHanzi(this.curMoney, '1')}`)
|
|
User.setLiXianTime(new Date().getTime())
|
|
this.node.removeFromParent()
|
|
this.node.destroy()
|
|
}
|
|
onBtnClickWuBeiLingQu(){
|
|
let tab = {
|
|
onClose: (finish) => {
|
|
if (finish) {
|
|
let mainTaskInfo: any = TaskManager.getCurUnLockMainTaskInfo()
|
|
let mainId = mainTaskInfo.Id
|
|
Common5.ReportDY("inLevel", `任务${mainId}-AD-离线收益5倍领取`);
|
|
|
|
UserManager.addMoney(this.curMoney*5)
|
|
PrefabManage.showTextTips(`获得${Common5.getNumberChangeHanzi(this.curMoney*5, '1')}`)
|
|
User.setLiXianTime(new Date().getTime())
|
|
this.node.removeFromParent()
|
|
this.node.destroy()
|
|
}
|
|
else {
|
|
Common5.showTips_custom("广告未观看完");
|
|
}
|
|
},
|
|
onFailed: () => { }
|
|
}
|
|
AppPlatform.playVideo_custom(tab);
|
|
}
|
|
}
|
|
|