import { GUIManager } from "../../../engines/gui/GUIManager"; import GUIMediator from "../../../engines/gui/GUIMediator"; import { LiangLiangSDK } from "../../../platforms/libs/liangliangSDK"; import { PlatformManager } from "../../../platforms/PlatformManager"; import UI_WX_S_04 from "../../../ui/WXSExport/UI_WX_S_04"; import UIKeys from "../../UIKeys"; import ExportList from "./ExportList"; export default class WXS04Mediator extends GUIMediator { private list:ExportList; constructor(){ super(); } protected OnShow():void{ PlatformManager.hideBanner(); if(this.list==null){ this.list=new ExportList(this.view.m_listIcon,1); } if(LiangLiangSDK.CanWuChu()){ this.view.m_btnVideo.visible = true; }else{ this.view.m_btnVideo.visible = false; } this.list.Refresh(); } protected OnHide():void{ } Tick(dt:number):void{ this.list.Tick(dt); } protected AddEvents():void{ this.view.m_btnVideo.onClick(this.VideoButtonClick,this); this.view.m_btnContine.onClick(this.ContineButtonClick,this); } protected RemoveEvents():void{ this.view.m_btnVideo.offClick(this.VideoButtonClick,this); this.view.m_btnContine.offClick(this.ContineButtonClick,this); } private VideoButtonClick():void{ PlatformManager.showRewardedVideo(()=>{ this.GotoWXS02(); }, ()=>{ }) } private ContineButtonClick():void{ this.GotoWXS02(); } private GotoWXS02():void{ GUIManager.single.Show(UIKeys.WXS02,this.data); this.HideSelf(); } private get view():UI_WX_S_04{ return this._view as UI_WX_S_04; } }