123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144 |
- var t = require;
- var e = module;
- var i = exports;
- var s =
- (this && this.__awaiter) ||
- function(t, n, r, l) {
- return new(r = r || Promise)(function(i, e) {
- function s(t) {
- try {
- a(l.next(t));
- } catch (t) {
- e(t);
- }
- }
- function o(t) {
- try {
- a(l.throw(t));
- } catch (t) {
- e(t);
- }
- }
- function a(t) {
- var e;
- t.done ?
- i(t.value) :
- ((e = t.value) instanceof r ?
- e :
- new r(function(t) {
- t(e);
- })
- ).then(s, o);
- }
- a((l = l.apply(t, n || [])).next());
- });
- };
- Object.defineProperty(i, "__esModule", { value: !0 });
- const o = t("App"),
- a = (t("LayerManager"), t("ADManageBase")),
- n = t("PlatformBase");
- i.default = class extends n.default {
- constructor() {
- super(),
- (this.expressAdNode = null),
- (this._isSignin = !1),
- void 0 === window.versionInfo && (window.versionInfo = { version: "", packVersion: "gm", zipVersion: "" });
- }
- init() {
- super.init(), Log.trace("平台为3---------", cc.sys.platform);
- }
- initAccountServer() {
- var t = o.default.ConfigManager.getConfig("Server")[this.getServerId()];
- (o.default.ConfigManager.gameConf.serverInfos.game = t.games[0].game),
- (o.default.ConfigManager.gameConf.serverInfos.interface = t.stat);
- t = o.default.ConfigManager.getServerCacheInfo();
- t &&
- ((o.default.ConfigManager.gameConf.serverInfos.game = t.game),
- (o.default.ConfigManager.gameConf.serverInfos.interface = t.stat));
- }
- getServerId() {
- return "test";
- }
- getChannel() {
- return "test";
- }
- isShowDebugUI() {
- return !1;
- }
- isAutoShowInteractionAd() {
- return !0;
- }
- showInteractionAd() {
- if (!this.expressAdNode) {
- let t = (this.expressAdNode = new cc.Node());
- (t.width = cc.winSize.width), (t.height = cc.winSize.height);
- o.default.ViewManager.uiRoot.addChild(this.expressAdNode), (this.expressAdNode.zIndex = 200);
- let e = t.addComponent(cc.Graphics);
- (e.fillColor = cc.color(0, 0, 0, 150)),
- e.fillRect(-cc.winSize.width / 2, -cc.winSize.height / 2, cc.winSize.width, cc.winSize.height),
- (e.fillColor = cc.Color.RED),
- e.fillRect(-175, -175, 350, 350);
- let i = new cc.Node();
- i.addComponent(cc.Label),
- t.addChild(i),
- (i.color = cc.Color.YELLOW),
- (i.x = 200),
- (i.y = 200),
- this.expressAdNode.addComponent(cc.BlockInputEvents);
- }
- let t = 5;
- const e = this.expressAdNode.getComponentInChildren(cc.Label);
- return (
- (e.string = t-- + ""),
- o.default.TimerManager.doTimer(
- 1e3,
- 5,
- () => {
- e.string = t-- + "";
- },
- this,
- () => {
- this.expressAdNode.active = !1;
- }
- ),
- (this.expressAdNode.active = !0)
- );
- }
- getAdState(t) {
- return 2;
- }
- showAD(t, e) {
- o.default.NotificationCenter.dispatch(a.AdEvent.SHOW_AD_RESULT, { code: 0 }, !0);
- }
- isGetRemoteRes() {
- return !1;
- }
- isCanShare() {
- return !0;
- }
- share(t, e) {
- o.default.NotificationCenter.dispatch(a.AdEvent.SHOW_AD_RESULT, { code: 0 }, !0);
- }
- login() {
- return s(this, void 0, void 0, function*() {
- return this.loginInfo.token ? Promise.resolve({ code: 0, loginKey: this.loginInfo.token }) : this.tourist();
- });
- }
- clearAndResetGame(t = !1) {
- return s(this, void 0, void 0, function*() {
- t && this.saveData(),
- o.default.SaveManage.clear(),
- o.default.SaveManage.clearAllItem(),
- cc.audioEngine.stopAll(),
- window.location.reload();
- });
- }
- buy(e) {
- return s(this, void 0, void 0, function*() {
- var t = this.getProductConfigByPayString(e);
- return (this.playerSpendMoney = t.cost), !0;
- });
- }
- };
|