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.
92 lines
2.5 KiB
92 lines
2.5 KiB
|
|
import AppPlatform from "../../../FrameWork/Util/AppPlatform";
|
|
import Common5 from "../../../Platform/th/Common5";
|
|
import YiMaJiangManager from "./YiMaJiangManager";
|
|
|
|
|
|
const {ccclass, property} = cc._decorator;
|
|
|
|
@ccclass
|
|
export default class YiMaJiangResult extends cc.Component {
|
|
|
|
@property(cc.Node)
|
|
successNode: cc.Node = null;
|
|
|
|
@property(cc.Node)
|
|
failNode: cc.Node = null;
|
|
|
|
// LIFE-CYCLE CALLBACKS:
|
|
|
|
// onLoad () {}
|
|
leftCallFunc = null
|
|
rightCallFunc = null
|
|
|
|
start () {
|
|
|
|
}
|
|
|
|
initView(tag,leftCallFunc,rightCallFunc){
|
|
this.leftCallFunc = leftCallFunc
|
|
this.rightCallFunc = rightCallFunc
|
|
if(tag == 'success'){
|
|
let mjConfig = YiMaJiangManager.getMjConfig()
|
|
|
|
this.successNode.active = true
|
|
this.failNode.active = false
|
|
this.successNode.getChildByName('money').getComponent(cc.Label).string = Common5.getNumberChangeHanzi(mjConfig.jiangLi,'1',1)+''
|
|
|
|
}else{
|
|
this.successNode.active = false
|
|
this.failNode.active = true
|
|
}
|
|
}
|
|
onSuccessLingQu(){
|
|
this.leftCallFunc && this.leftCallFunc()
|
|
this.node.removeFromParent()
|
|
this.node.destroy()
|
|
}
|
|
onSuccessShuangBeiLingQu(){
|
|
let tab = {
|
|
onClose: (finish)=>{
|
|
if(finish) {
|
|
Common5.ReportDY("inLevel", '复活-AD-移麻将');
|
|
this.rightCallFunc && this.rightCallFunc()
|
|
this.node.removeFromParent()
|
|
this.node.destroy()
|
|
}
|
|
else{
|
|
Common5.showTips_custom("广告未观看完");
|
|
}
|
|
|
|
},onFailed:()=>{
|
|
|
|
}
|
|
}
|
|
AppPlatform.playVideo_custom(tab)
|
|
}
|
|
onFailRestart(){
|
|
this.leftCallFunc && this.leftCallFunc()
|
|
this.node.removeFromParent()
|
|
this.node.destroy()
|
|
}
|
|
onFailFuHuo(){
|
|
let tab = {
|
|
onClose: (finish)=>{
|
|
if(finish) {
|
|
Common5.ReportDY("inLevel", '复活-AD-移麻将');
|
|
this.rightCallFunc && this.rightCallFunc()
|
|
this.node.removeFromParent()
|
|
this.node.destroy()
|
|
}
|
|
else{
|
|
Common5.showTips_custom("广告未观看完");
|
|
}
|
|
|
|
},onFailed:()=>{
|
|
|
|
}
|
|
}
|
|
AppPlatform.playVideo_custom(tab)
|
|
}
|
|
// update (dt) {}
|
|
}
|
|
|