159 lines
5.7 KiB
JavaScript
159 lines
5.7 KiB
JavaScript
"use strict";
|
|
cc._RF.push(module, '61d4ccY2ztLMYIh8WvqPPAw', 'GameAppStart');
|
|
// Script/module/GameStart/GameAppStart.ts
|
|
|
|
window.initMgr = function () {
|
|
if (cc.fx) {
|
|
return;
|
|
}
|
|
cc.fx = {};
|
|
console.log("初始化");
|
|
//基础状态信息
|
|
cc.fx.StateInfo = {
|
|
debugMode: true,
|
|
networkConnected: true,
|
|
networkType: 'none',
|
|
isOnForeground: true //当前是否是在前台
|
|
};
|
|
cc.fx.ShareInfo = {
|
|
queryId: -1 //分享id
|
|
};
|
|
/*
|
|
* 客户端埋点分享类型
|
|
*/
|
|
cc.fx.BurialShareType = {
|
|
Default: "default",
|
|
Invite: "invite",
|
|
DailyInviteRoomJoin: 'invite_join_room',
|
|
DailyInviteFriend: 'invite_friend',
|
|
DailyInviteGroup: 'invate_group',
|
|
DailyInviteGroupAlive: 'invate_alive',
|
|
DailyInviteGroupReward: 'invate_rewared',
|
|
DailyInviteGroupBox: 'invate_box',
|
|
DailyInviteGroupBall: 'invate_ball',
|
|
MatchResult: 'matchResult',
|
|
MatchFix5: 'MatchFix5',
|
|
MatchFix20: 'MatchFix20',
|
|
MatchFix100: 'MatchFix100',
|
|
MatchFix500: 'MatchFix500',
|
|
NewerRedEnvelope: 'newerRedEnvelope',
|
|
CoinRoomResult: 'coinRoomResult',
|
|
HighRate: "highRate",
|
|
CoinRoomWinStreak: 'coinRoomWinStreak',
|
|
CoinRoomBankruptcy1: 'coinRoomBankruptcy1',
|
|
CoinRoomBankruptcy2: 'coinRoomBankruptcy2',
|
|
CoinRoomBankruptcy3: 'coinRoomBankruptcy3',
|
|
};
|
|
cc.fx.BurialShareConfig = {
|
|
invite: {
|
|
oneGroupDayCount: 1 //同一个群一天最多分享次数:超过次数将不再向服务器获取奖励,并且提醒用户分享到不同的群
|
|
},
|
|
FetchGroupID: {
|
|
oneGroupDayCount: 1 //同一个群一天最多分享次数:超过次数将不再向服务器获取奖励,并且提醒用户分享到不同的群
|
|
},
|
|
SegmentUp: {
|
|
painting: true,
|
|
},
|
|
RankNotify: {
|
|
painting: true,
|
|
},
|
|
FTResult: {
|
|
painting: true,
|
|
},
|
|
highRate: {
|
|
painting: true,
|
|
},
|
|
matchResult: {
|
|
painting: true,
|
|
},
|
|
MatchFix5: {
|
|
painting: true,
|
|
},
|
|
MatchFix20: {
|
|
painting: true,
|
|
},
|
|
MatchFix100: {
|
|
painting: true,
|
|
},
|
|
MatchFix500: {
|
|
painting: true,
|
|
},
|
|
coinRoomWinStreak: {
|
|
painting: true,
|
|
},
|
|
};
|
|
/*
|
|
* 分享到哪儿给奖励 group frined all
|
|
*/
|
|
cc.fx.ShareWhereReward = {
|
|
Group: "group",
|
|
Friend: "friend",
|
|
All: "all",
|
|
};
|
|
/**
|
|
* 日志相关方法,若不符合项目组标准,可自行进行扩展
|
|
*/
|
|
cc.fx.OUTPUT_LOG = 1;
|
|
cc.fx.OUTPUT_INFO = 1 << 1;
|
|
cc.fx.OUTPUT_WARN = 1 << 2;
|
|
cc.fx.OUTPUT_ERR = 1 << 3;
|
|
cc.fx.OUTPUT_LV = cc.fx.OUTPUT_ERR | cc.fx.OUTPUT_WARN | cc.fx.OUTPUT_INFO | cc.fx.OUTPUT_LOG;
|
|
cc.fx.clickStatEventType = {
|
|
clickStatEventTypeVideoAD: 20173201,
|
|
clickStatEventTypeClickAdVideo: 20173202,
|
|
clickStatEventTypeBannerAD: 20173203,
|
|
clickStatEventTypeUserFrom: 99990001,
|
|
clickStatEventTypeShare: 99990002,
|
|
clickStatEventTypeClickAdBtn: 99990007,
|
|
clickStatEventTypeBannerAD2: 67890033,
|
|
clickStatEventTypeSubmitVersionInfo: 9999,
|
|
clickStatEventTypeClickFirstAd: 99990003,
|
|
clickStatEventTypeClickSecondAd: 99990004,
|
|
clickStatEventTypeWxLoginStart: 10001,
|
|
clickStatEventTypeWxLoginSuccess: 10002,
|
|
clickStatEventTypeWxLoginFailed: 10003,
|
|
clickStatEventTypeAuthorizationStart: 10003,
|
|
clickStatEventTypeAuthorizationSuccess: 10004,
|
|
clickStatEventTypeAuthorizationFailed: 10005,
|
|
clickStatEventTypeLoginSDKStart: 10007,
|
|
clickStatEventTypeLoginSDKSuccess: 10008,
|
|
clickStatEventTypeLoginSDKFailed: 10009,
|
|
clickStatEventTypeTCP_Start: 10009,
|
|
clickStatEventTypeTCP_Success: 10010,
|
|
clickStatEventTypeTCP_Failed: 10011,
|
|
};
|
|
//应用系统信息
|
|
// cc.fx.SystemInfo = require("../BallSDK/BallSystemInfo");
|
|
// cc.fx.SystemInfo.init();
|
|
// cc.fx.EventType = require("../BallSDK/BallEventType");
|
|
// cc.fx.UserInfo = require("../BallGame/UserInfo");
|
|
// cc.fx.OutPut = require("../BallUtil/LogOutPut");
|
|
// cc.fx.HttpUtil= require("../BallSDK/BallHttpUtil");
|
|
// cc.fx.EncodeDecode = require("../BallUtil/BallEncodeDecode");
|
|
// cc.fx.NotificationCenter = require("../BallUtil/BallNotificationCenter");
|
|
// cc.fx.Timer = require("../BallUtil/BallTimer");
|
|
// cc.fx.Util = require("../BallUtil/BallUtil");
|
|
// cc.fx.TCPMSG = require("../BallSDK/BallTCP_Msg");
|
|
// cc.fx.TCPRECEIVER = require("../BallSDK/BallTCP_Receiver");
|
|
// cc.fx.TCPRECEIVER.init();
|
|
// cc.fx.Loader = require("../BallUtil/BallLoader");
|
|
// cc.fx.PopWindowManager = require("../BallWindow/BallPopWindonwManager");
|
|
// cc.fx.PopWindowManager.preload();
|
|
// cc.fx.TipManager = require("../BallWindow/TipWindowManager");
|
|
// cc.fx.PayModel = require("../BallModel/BallPayModel");
|
|
// cc.fx.SceneManager = require("../BallUtil/BallSceneManager");
|
|
// cc.fx.MapCheckPoint = require("../BallUtil/MapCheckPointManager");
|
|
// cc.fx.MapCheckPoint.initMapCheckPointBallInfo();
|
|
// cc.fx.MapPointScore = require("../BallCheckPoint/CheckPointScore");
|
|
// cc.fx.Storage = require('../BallUtil/BallStorage');
|
|
// if (cc.sys.isBrowser) {
|
|
// cc.fx.Storage = require('../BallUtil/BallStorage');
|
|
// } else {
|
|
// cc.fx.Storage = require('../BallUtil/WeChatStorage');
|
|
// }
|
|
// cc.fx.Gift = require("../BallModel/BallGiftBox");
|
|
// cc.fx.Invite = require('../BallModel/BallInvite');
|
|
// cc.fx.ClientConf = require("../BallModel/BallClientConf");
|
|
};
|
|
|
|
cc._RF.pop(); |