123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178 |
- System.register(["cc"], function (_export, _context) {
- "use strict";
- var _cclegacy, __checkObsolete__, __checkObsoleteInNamespace__, native, sys, PlatformDefault, _crd;
- return {
- setters: [function (_cc) {
- _cclegacy = _cc.cclegacy;
- __checkObsolete__ = _cc.__checkObsolete__;
- __checkObsoleteInNamespace__ = _cc.__checkObsoleteInNamespace__;
- native = _cc.native;
- sys = _cc.sys;
- }],
- execute: function () {
- _crd = true;
- _cclegacy._RF.push({}, "8bc71in2KdBv7OXj86n3Sph", "PlatformDefault", undefined);
- __checkObsolete__(['native', 'sys']);
- PlatformDefault = class PlatformDefault {
- initialize() {
- console.log('初始化默认广告框架');
- }
- showToast(param) {
- console.log('显示toast ', param);
- }
- shareAppMessage(param) {
- if (param === void 0) {
- param = {};
- }
- console.log('分享 ', param);
- }
- vibrateShort(param) {
- if (param === void 0) {
- param = {};
- }
- console.log('短震动 ', param);
- }
- vibrateLong(param) {
- if (param === void 0) {
- param = {};
- }
- console.log('长震动 ', param);
- }
- shareShowReward(handler) {
- if (handler === void 0) {
- handler = null;
- }
- console.log('直接执行分享回调');
- if (handler) handler();
- }
- addDesk(handler) {
- if (handler === void 0) {
- handler = null;
- }
- console.log('添加到桌面回调');
- if (handler) handler();
- }
- showRewardVideo(handler) {
- if (handler === void 0) {
- handler = null;
- }
- console.log('直接执行视频回调');
- if (sys.platform == sys.Platform.ANDROID) {
- //安卓
- native.reflection.callStaticMethod("org/cocos2dx/javascript/AppActivity", "videoAd", "()V"); //msgHints.show("移动客户端模拟视频点击成功!");
- if (handler) handler(true); //设置原生回调
- /*globalThis.videoCallback = function(status) {
- if (handler) handler(status);
- };*/
- } else if (sys.platform == sys.Platform.IOS) {
- //苹果
- native.reflection.callStaticMethod("AppController", "videoAd", ''); //msgHints.show("移动客户端模拟视频点击成功!");
- if (handler) handler(true); //设置原生回调
- /*globalThis.videoCallback = function(status) {
- if (handler) handler(status);
- };*/
- } else {
- //msgHints.show("非移动客户端模拟视频点击成功!");
- if (handler) handler(true);
- }
- }
- showBannerAd() {
- console.log('显示banner广告');
- }
- hideBannerAd(recreate) {
- if (recreate === void 0) {
- recreate = false;
- }
- console.log('隐藏banner广告,刷新:', recreate);
- }
- refreshBannerAd() {
- console.log('刷新banner广告');
- }
- showInterstitialAd() {
- console.log('显示插屏广告');
- }
- showCustomAd() {
- console.log('显示自定义广告');
- }
- hideCustomAd() {
- console.log('隐藏自定义广告');
- }
- showSigleCustomAd() {
- console.log('展示单个自定义广告');
- }
- hideSigleCustomAd() {
- console.log('隐藏展示单个自定义广告');
- }
- exitGame() {
- console.log('退出游戏');
- }
- __createVideoAd() {
- console.log('创建视频广告');
- }
- __createBannerAd() {
- console.log('创建banner广告');
- }
- __createInterstitialAd() {
- console.log('创建插屏广告');
- }
- __customAdExist() {
- console.log('格子广告是否存在');
- }
- /**
- * 是否支持添加桌面
- * @returns
- */
- isSupportDesk() {
- return false;
- }
- };
- _export("default", new PlatformDefault());
- _cclegacy._RF.pop();
- _crd = false;
- }
- };
- });
- //# sourceMappingURL=5e69e88b7f137ec9ca81b0f8b241ebde0595b431.js.map
|