Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
TNGD_CaveCruiser
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
SparkProjects
TNGD_CaveCruiser
Commits
f4a14f7f
Commit
f4a14f7f
authored
Sep 20, 2024
by
haiyoucuv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
上传
parent
685aa7ab
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
44 additions
and
22 deletions
+44
-22
GameMgr.ts
assets/Scripts/GameMgr.ts
+33
-16
NoPrizePanel.ts
assets/Scripts/Panels/NoPrizePanel.ts
+5
-3
Start.scene
assets/Start/Start.scene
+2
-2
NoPrizePanel.prefab
assets/resources/NoPrizePanel/NoPrizePanel.prefab
+1
-0
submit.json
preview-template/mock/app/game/submit.json
+3
-1
No files found.
assets/Scripts/GameMgr.ts
View file @
f4a14f7f
import
{
sendWebNet
,
WebNetName
}
from
"./Utils/WebNet/WebNet"
;
import
{
sendWebNet
,
WebNetName
}
from
"./Utils/WebNet/WebNet"
;
import
{
changeScene
,
hideWaiting
,
showPanel
,
showWaiting
}
from
"db://assets/Module/UIFast"
;
import
{
changeScene
,
hideWaiting
,
showPanel
,
show
Toast
,
show
Waiting
}
from
"db://assets/Module/UIFast"
;
import
{
AESDecrypt
,
AESEncrypt
}
from
"./Utils/Crypto"
;
import
{
AESDecrypt
,
AESEncrypt
}
from
"./Utils/Crypto"
;
import
store
from
"./store/store"
;
import
store
from
"./store/store"
;
import
{
HomeScene
}
from
"./Scenes/HomeScene"
;
import
{
HomeScene
}
from
"./Scenes/HomeScene"
;
...
@@ -72,25 +72,42 @@ export default class GameMgr {
...
@@ -72,25 +72,42 @@ export default class GameMgr {
hideWaiting
();
hideWaiting
();
if
(
!
success
)
{
if
(
!
success
)
{
// changeScene(HomeScene);
changeScene
(
HomeScene
);
showPanel
(
NoPrizePanel
,
{
highest
:
score
,
score
,
isError
:
true
,
});
return
false
;
return
false
;
}
}
const
panelData
=
{
if
(
data
.
thirdCode
&&
+
data
.
thirdCode
!=
10000
)
{
prizeVO
:
data
?.
prizeVO
,
if
(
+
data
.
thirdCode
==
10001
)
{
highest
:
data
?.
historyMaxScore
||
0
,
showPanel
(
NoPrizePanel
,
{
score
,
highest
:
score
,
}
score
,
if
(
data
?.
prizeVO
)
{
errorMsg
:
"There are too many people currently.
\n
"
+
showPanel
(
PrizePanel
,
panelData
);
"You can check the coupon pack later
\n
"
+
"to see if you won."
,
});
}
else
if
(
+
data
.
thirdCode
==
10002
)
{
showPanel
(
NoPrizePanel
,
{
highest
:
score
,
score
,
errorMsg
:
"System exception.
\n
"
+
"You can check the coupon pack later
\n
"
+
"to see if you won."
,
});
}
else
{
showToast
(
data
.
thirdMsg
);
changeScene
(
HomeScene
);
}
}
else
{
}
else
{
showPanel
(
NoPrizePanel
,
panelData
);
const
panelData
=
{
prizeVO
:
data
?.
prizeVO
,
highest
:
data
?.
historyMaxScore
||
0
,
score
,
}
if
(
data
?.
prizeVO
)
{
showPanel
(
PrizePanel
,
panelData
);
}
else
{
showPanel
(
NoPrizePanel
,
panelData
);
}
}
}
}
}
...
...
assets/Scripts/Panels/NoPrizePanel.ts
View file @
f4a14f7f
...
@@ -21,6 +21,7 @@ export default class NoPrizePanel extends Panel {
...
@@ -21,6 +21,7 @@ export default class NoPrizePanel extends Panel {
@
property
(
Node
)
box
:
Node
=
null
;
@
property
(
Node
)
box
:
Node
=
null
;
@
property
(
Node
)
errorTip
:
Node
=
null
;
@
property
(
Node
)
errorTip
:
Node
=
null
;
@
property
(
Node
)
errorTip2
:
Node
=
null
;
onLoad
()
{
onLoad
()
{
...
@@ -30,13 +31,14 @@ export default class NoPrizePanel extends Panel {
...
@@ -30,13 +31,14 @@ export default class NoPrizePanel extends Panel {
}
}
async
start
()
{
async
start
()
{
const
{
highest
,
score
,
isError
}
=
this
.
data
;
const
{
highest
,
score
,
errorMsg
}
=
this
.
data
;
this
.
highestLabel
.
string
=
highest
;
this
.
highestLabel
.
string
=
highest
;
this
.
scoreLabel
.
string
=
score
;
this
.
scoreLabel
.
string
=
score
;
this
.
box
.
active
=
!
isError
;
this
.
box
.
active
=
!
errorMsg
;
this
.
errorTip
.
active
=
isError
;
this
.
errorTip
.
active
=
errorMsg
;
this
.
errorTip
.
getComponent
(
Label
).
string
=
this
.
data
.
errorMsg
;
}
}
clickRank
=
()
=>
{
clickRank
=
()
=>
{
...
...
assets/Start/Start.scene
View file @
f4a14f7f
...
@@ -95,7 +95,7 @@
...
@@ -95,7 +95,7 @@
"_prefab": null,
"_prefab": null,
"_lpos": {
"_lpos": {
"__type__": "cc.Vec3",
"__type__": "cc.Vec3",
"x": 375
.00000000000006
,
"x": 375,
"y": 812,
"y": 812,
"z": 0
"z": 0
},
},
...
@@ -961,7 +961,7 @@
...
@@ -961,7 +961,7 @@
"__prefab": null,
"__prefab": null,
"_contentSize": {
"_contentSize": {
"__type__": "cc.Size",
"__type__": "cc.Size",
"width": 749.999999999999
9
,
"width": 749.999999999999
8
,
"height": 1624
"height": 1624
},
},
"_anchorPoint": {
"_anchorPoint": {
...
...
assets/resources/NoPrizePanel/NoPrizePanel.prefab
View file @
f4a14f7f
...
@@ -1895,6 +1895,7 @@
...
@@ -1895,6 +1895,7 @@
"errorTip": {
"errorTip": {
"__id__": 68
"__id__": 68
},
},
"errorTip2": null,
"_id": ""
"_id": ""
},
},
{
{
...
...
preview-template/mock/app/game/submit.json
View file @
f4a14f7f
...
@@ -7,7 +7,9 @@
...
@@ -7,7 +7,9 @@
"optionName"
:
"optionName"
,
"optionName"
:
"optionName"
,
"optionImg"
:
"optionImg"
"optionImg"
:
"optionImg"
},
},
"historyMaxScore"
:
9999
"historyMaxScore"
:
9999
,
"thirdCode"
:
10002
,
"thirdMsg"
:
"thirdMsg"
},
},
"timestamp"
:
1724379274542
"timestamp"
:
1724379274542
}
}
\ No newline at end of file
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