Commit abf3d6bd authored by 范雪寒's avatar 范雪寒

feat: 页面配置

parent ff870b72
{
"ver": "1.1.2",
"uuid": "943b6aa9-8754-478d-9db9-6e80faa25960",
"uuid": "7e76f46c-001c-42d7-ab08-a7608cc673f4",
"isBundle": false,
"bundleName": "",
"priority": 1,
......
{
"ver": "1.0.8",
"uuid": "771c13cf-dd4a-4c25-9dca-413a319550cf",
"uuid": "f95ef923-1864-4251-886f-b8aae631d5cd",
"isPlugin": true,
"loadPluginInWeb": true,
"loadPluginInNative": true,
......
......@@ -29,11 +29,11 @@ export class NetworkHelper {
}
room: MGOBE.Room;
initRoom() {
initRoom(cacertFile: any = undefined) {
return new Promise((resolve, reject) => {
const gameId = "obg-d75cgddl"; //替换为控制台上的 游戏 ID
const secretKey = "ee8c7260319780749d5f13bfe1420a4d083cbc77"; //替换为控制台上的 游戏 Key
const serverUrl = "d75cgddl.wxlagame.com"; //替换为控制台上的 域名
const gameId = "obg-i4ql53h1"; //替换为控制台上的 游戏 ID
const secretKey = "060d81c7abaf24c8ce2afc5a725c152062676d35"; //替换为控制台上的 游戏 Key
const serverUrl = "i4ql53h1.wxlagame.com"; //替换为控制台上的 域名
const gameInfo = {
gameId: gameId,
......@@ -49,18 +49,22 @@ export class NetworkHelper {
cacertNativeUrl: ""
};
// MGOBE.DebuggerLog.enable = true;
MGOBE.DebuggerLog.enable = true;
// 如果是原生平台,则加载 Cert 证书,否则会提示 WSS 错误
// if (cc.sys.isNative) {
// config.cacertNativeUrl = cc.loader.md5Pipe && cc.ENGINE_VERSION < "2.4.0" ?
// cc.loader.md5Pipe.transformURL(this.cacertFile.nativeUrl) :
// this.cacertFile.nativeUrl;
// }
if (cc.sys.isNative) {
if (!cacertFile) {
this.log('没有cacertFile!!!');
}
this.log('汪汪汪: ' + cacertFile.nativeUrl);
config.cacertNativeUrl = cc.loader.md5Pipe && cc.ENGINE_VERSION < "2.4.0" ?
cc.loader.md5Pipe.transformURL(cacertFile.nativeUrl) :
cacertFile.nativeUrl;
}
MGOBE.Listener.init(gameInfo, config, event => {
console.log(event);
if (event.code !== 0) {
this.log("初始化失败");
this.log("初始化失败: " + event.code);
reject();
return;
}
......
This diff is collapsed.
......@@ -33,7 +33,13 @@ export default class SceneComponent extends MyCocosSceneComponent {
async initData() {
this.networkHelper = new NetworkHelper();
await this.networkHelper.initRoom();
let cacertFile;
const cacertNode = cc.find('cacertNode');
if (cacertNode) {
cacertFile = cacertNode.getComponent('cacert').cacertFile;
}
await this.networkHelper.initRoom(cacertFile);
this.playerId = await this.networkHelper.joinRoom('op_16', 2);
// const roomInfo = this.networkHelper.getRoomInfo();
......
......@@ -11,7 +11,7 @@
"height": 565,
"platformSettings": {},
"subMetas": {
"棋盘---副本-(4)": {
"dice": {
"ver": "1.0.4",
"uuid": "c335444d-5b10-40c1-afc1-6e5f5151b6a9",
"rawTextureUuid": "7860da89-d8d0-4816-8626-26c45ec4031c",
......
......@@ -11,7 +11,7 @@
"height": 319,
"platformSettings": {},
"subMetas": {
"棋盘---副本-(7)": {
"dice_bg": {
"ver": "1.0.4",
"uuid": "2acf4e3f-154a-48ee-ab12-2a8ff8bd30c7",
"rawTextureUuid": "69fb6834-9a86-4733-9d0a-22ff46b6f415",
......
......@@ -11,7 +11,7 @@
"height": 155,
"platformSettings": {},
"subMetas": {
"5826": {
"hat": {
"ver": "1.0.4",
"uuid": "4fb05006-f192-4fa2-a680-64030ca06442",
"rawTextureUuid": "aa49c2a4-337b-40f2-8fce-5622715a1c24",
......
......@@ -11,7 +11,7 @@
"height": 785,
"platformSettings": {},
"subMetas": {
"棋盘---副本-(8)": {
"life": {
"ver": "1.0.4",
"uuid": "4af2e965-7b72-44b4-9a95-94b2958cd5c3",
"rawTextureUuid": "958b1b01-8e14-4d5e-9e10-f0f7787bc4cc",
......
......@@ -11,7 +11,7 @@
"height": 108,
"platformSettings": {},
"subMetas": {
"棋盘": {
"point": {
"ver": "1.0.4",
"uuid": "cb763712-7b0a-450e-b2db-821b915af067",
"rawTextureUuid": "12a75ef7-2b39-45d6-b7ad-1fdbfe05c2a7",
......
{
"ver": "2.3.5",
"uuid": "8c9e0d6e-de6a-4e92-ae65-7c4d77bfcab2",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 180,
"height": 785,
"platformSettings": {},
"subMetas": {
"prograssbar": {
"ver": "1.0.4",
"uuid": "134eb0c8-f3f3-43ca-bbc2-62ef8b779572",
"rawTextureUuid": "8c9e0d6e-de6a-4e92-ae65-7c4d77bfcab2",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 68.5,
"trimX": 0,
"trimY": 0,
"width": 180,
"height": 648,
"rawWidth": 180,
"rawHeight": 785,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"game": {
"name": "tankgame",
"appid": "658373937",
"cid": "0"
"name": "oxford",
"appid": "682526339",
"cid": "14699"
},
"configs": [
{
"appid": "658373937",
"appid": "682526339",
"services": [
{
"service_id": "269",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment