Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Z
zjzy_client_game
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
王勇霞
zjzy_client_game
Commits
07da373c
Commit
07da373c
authored
Mar 24, 2023
by
王勇霞
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:test
parent
2019c511
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
29 additions
and
17 deletions
+29
-17
index.json
mock/webNet/game/index.json
+6
-6
upload.js
scripts/upload.js
+2
-2
uploadSingleJs.js
scripts/uploadSingleJs.js
+2
-2
ResJson.ts
src/ResJson.ts
+1
-1
GameScene.ts
src/scenes/GameScene.ts
+13
-1
StartScene.ts
src/scenes/StartScene.ts
+4
-4
webpack.prod.js
webpack.prod.js
+1
-1
No files found.
mock/webNet/game/index.json
View file @
07da373c
...
@@ -5,42 +5,42 @@
...
@@ -5,42 +5,42 @@
"dataInfo"
:
[
"dataInfo"
:
[
{
{
"num"
:
1
,
"num"
:
1
,
"context"
:
""
,
"context"
:
"
闲看晴云自卷舒
"
,
"context1"
:
"闲看晴云自卷舒"
,
"context1"
:
"闲看晴云自卷舒"
,
"ifComplete"
:
false
,
"ifComplete"
:
false
,
"count"
:
74413176.81524068
"count"
:
74413176.81524068
},
},
{
{
"num"
:
2
,
"num"
:
2
,
"context"
:
""
,
"context"
:
"
静水流深
"
,
"context1"
:
"卷"
,
"context1"
:
"卷"
,
"ifComplete"
:
false
,
"ifComplete"
:
false
,
"count"
:
10
"count"
:
10
},
},
{
{
"num"
:
3
,
"num"
:
3
,
"context"
:
""
,
"context"
:
"
云卷舒
"
,
"context1"
:
"云卷舒"
,
"context1"
:
"云卷舒"
,
"ifComplete"
:
false
,
"ifComplete"
:
false
,
"count"
:
10
"count"
:
10
},
},
{
{
"num"
:
5
,
"num"
:
5
,
"context"
:
""
,
"context"
:
"
心无意
"
,
"context1"
:
"心无意"
,
"context1"
:
"心无意"
,
"ifComplete"
:
true
,
"ifComplete"
:
true
,
"count"
:
10
"count"
:
10
},
},
{
{
"num"
:
4
,
"num"
:
4
,
"context"
:
""
,
"context"
:
"
自在休闲
"
,
"context1"
:
"自在休闲"
,
"context1"
:
"自在休闲"
,
"ifComplete"
:
false
,
"ifComplete"
:
false
,
"count"
:
10
"count"
:
10
}
}
],
],
"collectCount"
:
1
,
"collectCount"
:
1
,
"ifFirstPlay"
:
tru
e
"ifFirstPlay"
:
fals
e
},
},
"code"
:
"ipsum est tempor qui"
,
"code"
:
"ipsum est tempor qui"
,
"timestamp"
:
3627649.9094133973
"timestamp"
:
3627649.9094133973
...
...
scripts/upload.js
View file @
07da373c
...
@@ -24,8 +24,8 @@ class TuiaAutoUpload {
...
@@ -24,8 +24,8 @@ class TuiaAutoUpload {
var
_this
=
this
;
var
_this
=
this
;
this
.
client
=
new
OSS
({
this
.
client
=
new
OSS
({
region
:
'oss-cn-hangzhou'
,
region
:
'oss-cn-hangzhou'
,
accessKeyId
:
'LTAI5t
LEo6SbjfmNPmH7Mz3o
'
,
accessKeyId
:
'LTAI5t
AEU43ff2kFkrKRLnxG
'
,
accessKeySecret
:
'
8yZ6nVMg56DEupEEMRl6rz1DcpG2R7
'
,
accessKeySecret
:
'
2qQIPVT3Lgp72s8RShDlE4uVNqZWgy
'
,
bucket
:
_this
.
type
===
'prod'
?
'duiba'
:
'daily-duiba'
bucket
:
_this
.
type
===
'prod'
?
'duiba'
:
'daily-duiba'
});
});
this
.
bar
=
new
ProgressBar
(
chalk
.
yellow
(
` 文件上传中 [:bar] :current/
${
this
.
files
().
length
}
:percent :elapseds`
),
{
this
.
bar
=
new
ProgressBar
(
chalk
.
yellow
(
` 文件上传中 [:bar] :current/
${
this
.
files
().
length
}
:percent :elapseds`
),
{
...
...
scripts/uploadSingleJs.js
View file @
07da373c
...
@@ -39,8 +39,8 @@ function uploadSingleJs(url) {
...
@@ -39,8 +39,8 @@ function uploadSingleJs(url) {
const
originPath
=
`/db_games/
${
url
}
/output.js`
;
const
originPath
=
`/db_games/
${
url
}
/output.js`
;
var
client
=
new
OSS
({
var
client
=
new
OSS
({
region
:
'oss-cn-hangzhou'
,
region
:
'oss-cn-hangzhou'
,
accessKeyId
:
'LTAI5t
LEo6SbjfmNPmH7Mz3o
'
,
accessKeyId
:
'LTAI5t
AEU43ff2kFkrKRLnxG
'
,
accessKeySecret
:
'
8yZ6nVMg56DEupEEMRl6rz1DcpG2R7
'
,
accessKeySecret
:
'
2qQIPVT3Lgp72s8RShDlE4uVNqZWgy
'
,
bucket
:
'duiba'
bucket
:
'duiba'
})
})
var
originFile
;
var
originFile
;
...
...
src/ResJson.ts
View file @
07da373c
...
@@ -773,5 +773,5 @@ export const ResJson = {
...
@@ -773,5 +773,5 @@ export const ResJson = {
"name"
:
"svga"
"name"
:
"svga"
}
}
],
],
"path"
:
"https://yun.duiba.com.cn/db_games/activity/template/167964
7857
/resource/"
"path"
:
"https://yun.duiba.com.cn/db_games/activity/template/167964
9818
/resource/"
}
}
\ No newline at end of file
src/scenes/GameScene.ts
View file @
07da373c
...
@@ -19,6 +19,8 @@ import UI from "../UI";
...
@@ -19,6 +19,8 @@ import UI from "../UI";
import
{
allWords
}
from
"../contant"
;
import
{
allWords
}
from
"../contant"
;
import
{
getUrlParams
}
from
"../../module/web/webTools"
;
import
{
getUrlParams
}
from
"../../module/web/webTools"
;
import
{
GDispatcher
}
from
"../Main"
;
import
{
GDispatcher
}
from
"../Main"
;
const
testWord
:
any
=
[
'闲'
,
'看'
,
'晴'
,
'云'
,
'自'
,
'卷'
,
'舒'
,
'静'
,
'水'
,
'流'
,
'深'
,
'心'
,
'无'
,
'意'
,
'在'
,
'休'
]
export
class
GameScene
extends
Scene
{
export
class
GameScene
extends
Scene
{
get
groupNames
()
{
return
[
"GameScene"
]
};
get
groupNames
()
{
return
[
"GameScene"
]
};
get
skinName
()
{
return
"GameScene"
};
get
skinName
()
{
return
"GameScene"
};
...
@@ -39,6 +41,11 @@ export class GameScene extends Scene {
...
@@ -39,6 +41,11 @@ export class GameScene extends Scene {
}
}
async
start
(
data
)
{
async
start
(
data
)
{
super
.
start
();
super
.
start
();
// TODO——test
this
.
wordList
=
JSON
.
parse
(
JSON
.
stringify
(
testWord
));
// 待随机出现的列表
this
.
wordLen
=
this
.
wordList
.
length
;
// 需要收集字体的个数
this
.
collectList
=
[]
GameScene
.
instance
=
this
GameScene
.
instance
=
this
showPanel
(
GuidePanel
);
showPanel
(
GuidePanel
);
...
@@ -281,7 +288,6 @@ export class GameScene extends Scene {
...
@@ -281,7 +288,6 @@ export class GameScene extends Scene {
});
});
this
.
bgCon
.
addChildAt
(
mapItem
,
0
);
this
.
bgCon
.
addChildAt
(
mapItem
,
0
);
this
.
composites
.
add
(
this
.
world
,
[
mapItem
.
phyBody
]);
this
.
composites
.
add
(
this
.
world
,
[
mapItem
.
phyBody
]);
let
len
=
this
.
wordList
.
length
let
len
=
this
.
wordList
.
length
let
randomIndex
;
let
randomIndex
;
if
(
len
>
0
)
{
if
(
len
>
0
)
{
...
@@ -407,11 +413,17 @@ export class GameScene extends Scene {
...
@@ -407,11 +413,17 @@ export class GameScene extends Scene {
showToast
(
desc
||
"网络开小差了,稍后再试"
)
showToast
(
desc
||
"网络开小差了,稍后再试"
)
}
}
}
}
closeGame
()
{
changeScene
(
StartScene
)
}
initEvents
()
{
initEvents
()
{
super
.
initEvents
();
super
.
initEvents
();
GDispatcher
.
addEventListener
(
"closeGame"
,
this
.
closeGame
,
this
);
}
}
removeEvents
()
{
removeEvents
()
{
super
.
removeEvents
();
super
.
removeEvents
();
clearTimeout
(
this
.
timer
);
GDispatcher
.
removeEventListener
(
"closeGame"
,
this
.
closeGame
,
this
);
}
}
}
}
src/scenes/StartScene.ts
View file @
07da373c
...
@@ -86,10 +86,10 @@ export class StartScene extends Scene {
...
@@ -86,10 +86,10 @@ export class StartScene extends Scene {
}
}
async
openGame
()
{
async
openGame
()
{
this
.
btnDelay
(
this
.
startbtn
)
this
.
btnDelay
(
this
.
startbtn
)
if
(
this
.
getWordList
().
length
==
0
)
{
//
if (this.getWordList().length == 0) {
showToast
(
"您已获取今日全部游戏奖励,
\n
请明日再来"
);
//
showToast("您已获取今日全部游戏奖励,\n请明日再来");
return
//
return
}
//
}
const
{
success
,
code
,
data
,
desc
}
=
await
sendWebNet
(
WebNetName
.
startGame
,
{
const
{
success
,
code
,
data
,
desc
}
=
await
sendWebNet
(
WebNetName
.
startGame
,
{
activityId
:
getUrlParams
(
'activityId'
),
activityId
:
getUrlParams
(
'activityId'
),
type
:
3
type
:
3
...
...
webpack.prod.js
View file @
07da373c
...
@@ -3,7 +3,7 @@ const common = require('./webpack.common.js');
...
@@ -3,7 +3,7 @@ const common = require('./webpack.common.js');
const
webpack
=
require
(
'webpack'
);
const
webpack
=
require
(
'webpack'
);
module
.
exports
=
merge
(
common
,
{
module
.
exports
=
merge
(
common
,
{
mode
:
"
production
"
,
//production development
mode
:
"
development
"
,
//production development
devtool
:
'source-map'
,
devtool
:
'source-map'
,
plugins
:
[
plugins
:
[
new
webpack
.
DefinePlugin
({
new
webpack
.
DefinePlugin
({
...
...
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