Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
op_16
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
template admin
op_16
Commits
abf3d6bd
Commit
abf3d6bd
authored
Nov 30, 2021
by
范雪寒
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 页面配置
parent
ff870b72
Changes
18
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
1503 additions
and
30 deletions
+1503
-30
mgobejs.meta
assets/op_16/mgobejs.meta
+1
-1
MGOBE.js.meta
assets/op_16/mgobejs/MGOBE.js.meta
+1
-1
NetworkHelper.ts
assets/op_16/scene/NetworkHelper.ts
+15
-11
op_16.fire
assets/op_16/scene/op_16.fire
+1434
-7
op_16.ts
assets/op_16/scene/op_16.ts
+7
-1
dice.png
assets/op_16/textures/dice.png
+0
-0
dice.png.meta
assets/op_16/textures/dice.png.meta
+1
-1
dice_bg.png
assets/op_16/textures/dice_bg.png
+0
-0
dice_bg.png.meta
assets/op_16/textures/dice_bg.png.meta
+1
-1
hat.png
assets/op_16/textures/hat.png
+0
-0
hat.png.meta
assets/op_16/textures/hat.png.meta
+1
-1
life.png
assets/op_16/textures/life.png
+0
-0
life.png.meta
assets/op_16/textures/life.png.meta
+1
-1
point.png
assets/op_16/textures/point.png
+0
-0
point.png.meta
assets/op_16/textures/point.png.meta
+1
-1
prograssbar.png
assets/op_16/textures/prograssbar.png
+0
-0
prograssbar.png.meta
assets/op_16/textures/prograssbar.png.meta
+36
-0
services.json
settings/services.json
+4
-4
No files found.
assets/op_16/mgobejs.meta
View file @
abf3d6bd
{
{
"ver": "1.1.2",
"ver": "1.1.2",
"uuid": "
943b6aa9-8754-478d-9db9-6e80faa25960
",
"uuid": "
7e76f46c-001c-42d7-ab08-a7608cc673f4
",
"isBundle": false,
"isBundle": false,
"bundleName": "",
"bundleName": "",
"priority": 1,
"priority": 1,
...
...
assets/op_16/mgobejs/MGOBE.js.meta
View file @
abf3d6bd
{
{
"ver": "1.0.8",
"ver": "1.0.8",
"uuid": "
771c13cf-dd4a-4c25-9dca-413a319550cf
",
"uuid": "
f95ef923-1864-4251-886f-b8aae631d5cd
",
"isPlugin": true,
"isPlugin": true,
"loadPluginInWeb": true,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInNative": true,
...
...
assets/op_16/scene/NetworkHelper.ts
View file @
abf3d6bd
...
@@ -29,11 +29,11 @@ export class NetworkHelper {
...
@@ -29,11 +29,11 @@ export class NetworkHelper {
}
}
room
:
MGOBE
.
Room
;
room
:
MGOBE
.
Room
;
initRoom
()
{
initRoom
(
cacertFile
:
any
=
undefined
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
const
gameId
=
"
obg-
d75cgddl
"
;
//替换为控制台上的 游戏 ID
const
gameId
=
"
obg-
i4ql53h1
"
;
//替换为控制台上的 游戏 ID
const
secretKey
=
"
ee8c7260319780749d5f13bfe1420a4d083cbc77
"
;
//替换为控制台上的 游戏 Key
const
secretKey
=
"
060d81c7abaf24c8ce2afc5a725c152062676d35
"
;
//替换为控制台上的 游戏 Key
const
serverUrl
=
"
d75cgddl
.wxlagame.com
"
;
//替换为控制台上的 域名
const
serverUrl
=
"
i4ql53h1
.wxlagame.com
"
;
//替换为控制台上的 域名
const
gameInfo
=
{
const
gameInfo
=
{
gameId
:
gameId
,
gameId
:
gameId
,
...
@@ -49,18 +49,22 @@ export class NetworkHelper {
...
@@ -49,18 +49,22 @@ export class NetworkHelper {
cacertNativeUrl
:
""
cacertNativeUrl
:
""
};
};
//
MGOBE.DebuggerLog.enable = true;
MGOBE
.
DebuggerLog
.
enable
=
true
;
// 如果是原生平台,则加载 Cert 证书,否则会提示 WSS 错误
// 如果是原生平台,则加载 Cert 证书,否则会提示 WSS 错误
// if (cc.sys.isNative) {
if
(
cc
.
sys
.
isNative
)
{
// config.cacertNativeUrl = cc.loader.md5Pipe && cc.ENGINE_VERSION < "2.4.0" ?
if
(
!
cacertFile
)
{
// cc.loader.md5Pipe.transformURL(this.cacertFile.nativeUrl) :
this
.
log
(
'
没有cacertFile!!!
'
);
// this.cacertFile.nativeUrl;
}
// }
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
=>
{
MGOBE
.
Listener
.
init
(
gameInfo
,
config
,
event
=>
{
console
.
log
(
event
);
console
.
log
(
event
);
if
(
event
.
code
!==
0
)
{
if
(
event
.
code
!==
0
)
{
this
.
log
(
"
初始化失败
"
);
this
.
log
(
"
初始化失败
:
"
+
event
.
code
);
reject
();
reject
();
return
;
return
;
}
}
...
...
assets/op_16/scene/op_16.fire
View file @
abf3d6bd
This diff is collapsed.
Click to expand it.
assets/op_16/scene/op_16.ts
View file @
abf3d6bd
...
@@ -33,7 +33,13 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -33,7 +33,13 @@ export default class SceneComponent extends MyCocosSceneComponent {
async
initData
()
{
async
initData
()
{
this
.
networkHelper
=
new
NetworkHelper
();
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
);
this
.
playerId
=
await
this
.
networkHelper
.
joinRoom
(
'
op_16
'
,
2
);
// const roomInfo = this.networkHelper.getRoomInfo();
// const roomInfo = this.networkHelper.getRoomInfo();
...
...
assets/op_16/textures/
棋盘---副本-(4)
.png
→
assets/op_16/textures/
dice
.png
View file @
abf3d6bd
File moved
assets/op_16/textures/
棋盘---副本-(4)
.png.meta
→
assets/op_16/textures/
dice
.png.meta
View file @
abf3d6bd
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
"height": 565,
"height": 565,
"platformSettings": {},
"platformSettings": {},
"subMetas": {
"subMetas": {
"
棋盘---副本-(4)
": {
"
dice
": {
"ver": "1.0.4",
"ver": "1.0.4",
"uuid": "c335444d-5b10-40c1-afc1-6e5f5151b6a9",
"uuid": "c335444d-5b10-40c1-afc1-6e5f5151b6a9",
"rawTextureUuid": "7860da89-d8d0-4816-8626-26c45ec4031c",
"rawTextureUuid": "7860da89-d8d0-4816-8626-26c45ec4031c",
...
...
assets/op_16/textures/
棋盘---副本-(7)
.png
→
assets/op_16/textures/
dice_bg
.png
View file @
abf3d6bd
File moved
assets/op_16/textures/
棋盘---副本-(7)
.png.meta
→
assets/op_16/textures/
dice_bg
.png.meta
View file @
abf3d6bd
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
"height": 319,
"height": 319,
"platformSettings": {},
"platformSettings": {},
"subMetas": {
"subMetas": {
"
棋盘---副本-(7)
": {
"
dice_bg
": {
"ver": "1.0.4",
"ver": "1.0.4",
"uuid": "2acf4e3f-154a-48ee-ab12-2a8ff8bd30c7",
"uuid": "2acf4e3f-154a-48ee-ab12-2a8ff8bd30c7",
"rawTextureUuid": "69fb6834-9a86-4733-9d0a-22ff46b6f415",
"rawTextureUuid": "69fb6834-9a86-4733-9d0a-22ff46b6f415",
...
...
assets/op_16/textures/
5826
.png
→
assets/op_16/textures/
hat
.png
View file @
abf3d6bd
File moved
assets/op_16/textures/
5826
.png.meta
→
assets/op_16/textures/
hat
.png.meta
View file @
abf3d6bd
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
"height": 155,
"height": 155,
"platformSettings": {},
"platformSettings": {},
"subMetas": {
"subMetas": {
"
5826
": {
"
hat
": {
"ver": "1.0.4",
"ver": "1.0.4",
"uuid": "4fb05006-f192-4fa2-a680-64030ca06442",
"uuid": "4fb05006-f192-4fa2-a680-64030ca06442",
"rawTextureUuid": "aa49c2a4-337b-40f2-8fce-5622715a1c24",
"rawTextureUuid": "aa49c2a4-337b-40f2-8fce-5622715a1c24",
...
...
assets/op_16/textures/
棋盘---副本-(8)
.png
→
assets/op_16/textures/
life
.png
View file @
abf3d6bd
File moved
assets/op_16/textures/
棋盘---副本-(8)
.png.meta
→
assets/op_16/textures/
life
.png.meta
View file @
abf3d6bd
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
"height": 785,
"height": 785,
"platformSettings": {},
"platformSettings": {},
"subMetas": {
"subMetas": {
"
棋盘---副本-(8)
": {
"
life
": {
"ver": "1.0.4",
"ver": "1.0.4",
"uuid": "4af2e965-7b72-44b4-9a95-94b2958cd5c3",
"uuid": "4af2e965-7b72-44b4-9a95-94b2958cd5c3",
"rawTextureUuid": "958b1b01-8e14-4d5e-9e10-f0f7787bc4cc",
"rawTextureUuid": "958b1b01-8e14-4d5e-9e10-f0f7787bc4cc",
...
...
assets/op_16/textures/
棋盘
.png
→
assets/op_16/textures/
point
.png
View file @
abf3d6bd
File moved
assets/op_16/textures/
棋盘
.png.meta
→
assets/op_16/textures/
point
.png.meta
View file @
abf3d6bd
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
"height": 108,
"height": 108,
"platformSettings": {},
"platformSettings": {},
"subMetas": {
"subMetas": {
"
棋盘
": {
"
point
": {
"ver": "1.0.4",
"ver": "1.0.4",
"uuid": "cb763712-7b0a-450e-b2db-821b915af067",
"uuid": "cb763712-7b0a-450e-b2db-821b915af067",
"rawTextureUuid": "12a75ef7-2b39-45d6-b7ad-1fdbfe05c2a7",
"rawTextureUuid": "12a75ef7-2b39-45d6-b7ad-1fdbfe05c2a7",
...
...
assets/op_16/textures/prograssbar.png
0 → 100644
View file @
abf3d6bd
53.8 KB
assets/op_16/textures/prograssbar.png.meta
0 → 100644
View file @
abf3d6bd
{
"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
settings/services.json
View file @
abf3d6bd
{
{
"game"
:
{
"game"
:
{
"name"
:
"
tankgame
"
,
"name"
:
"
oxford
"
,
"appid"
:
"6
58373937
"
,
"appid"
:
"6
82526339
"
,
"cid"
:
"
0
"
"cid"
:
"
14699
"
},
},
"configs"
:
[
"configs"
:
[
{
{
"appid"
:
"6
58373937
"
,
"appid"
:
"6
82526339
"
,
"services"
:
[
"services"
:
[
{
{
"service_id"
:
"269"
,
"service_id"
:
"269"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment