1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- import { GameMng } from "../../GameMng";
- import AudioMng from "../AudioMng";
- import { Singleton } from "../Singleton";
- export class BasePlatform extends Singleton<BasePlatform>() {
- shareobj = {
- title: "[有人@你]经典残局等你来战,快来试试吧!",
- imageUrl: "Res/texture/glow.png",
- query: ""
- }
- //banner
- protected bannerAd:any=null;
- public bannerdisTime:number=0;
- public bannerrefreshTime:number=10000;
- //插屏
- protected pagead:any=null;
- //视频
- protected videoloaded:boolean=false;
- protected rewardedVideoAd:any=null;
- protected videoSucCall:Function=null;
- //初始化
- init(){
-
- }
- //显示插屏广告
- showPageAd(onSucc?: Function, onFail?: Function, caller?: any): void {
- console.log('base');
- if (onSucc) onSucc.call(caller);
- if (onFail) onFail.call(caller);
- }
- //关闭插屏
- closePageAd(){
-
- }
-
- //显示视频广告
- showVideoAd(onSucc?: Function, onFail?: Function, caller?: any): void {
- console.log('base');
- if (onSucc) onSucc.call(caller);
- if (onFail) onFail.call(caller);
- }
- showPlatformMsg() {
- }
- showModal(obj: any) {
- }
- share(shareObj, onSucc, caller) {
- if (onSucc) {
- AudioMng.Instance.PlayBGM(GameMng.Instance.gamebgm);
- onSucc.call(caller);
- }
- }
-
- }
|