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
b3a3076d
Commit
b3a3076d
authored
Aug 13, 2024
by
haiyoucuv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更改
parent
933605a2
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
6 deletions
+20
-6
GameMgr.ts
assets/Scripts/GameMgr.ts
+2
-0
NoPrizePanel.ts
assets/Scripts/Panels/NoPrizePanel.ts
+16
-3
PrizePanel.ts
assets/Scripts/Panels/PrizePanel.ts
+0
-1
NoPrizePanel.prefab
assets/resources/NoPrizePanel/NoPrizePanel.prefab
+2
-2
No files found.
assets/Scripts/GameMgr.ts
View file @
b3a3076d
import
{
sendWebNet
,
sendWebNetWithToken
,
WebNetName
}
from
"./Utils/WebNet/WebNet"
;
import
{
hideWaiting
,
showWaiting
}
from
"db://assets/Module/UIFast"
;
import
{
AESDecrypt
,
AESEncrypt
}
from
"./Utils/Crypto"
;
import
store
from
"../store/store"
;
// const en = AESEncrypt(JSON.stringify({
// recordId: 232323,
...
...
@@ -34,6 +35,7 @@ export default class GameMgr {
*/
async
start
()
{
const
{
success
,
data
}
=
await
sendWebNetWithToken
(
WebNetName
.
start
);
store
.
updateIndex
();
if
(
!
success
)
{
return
false
;
}
...
...
assets/Scripts/Panels/NoPrizePanel.ts
View file @
b3a3076d
import
Panel
from
"../../Module/Panel"
;
import
{
_decorator
,
Button
,
Label
,
Node
}
from
"cc"
;
import
{
changeScene
}
from
"db://assets/Module/UIFast"
;
import
{
changeScene
,
showToast
}
from
"db://assets/Module/UIFast"
;
import
{
HomeScene
}
from
"db://assets/Scripts/Scenes/HomeScene"
;
import
GameMgr
from
"../GameMgr"
;
import
store
from
"../../store/store"
;
import
{
MainGame
}
from
"../Scenes/MainGame/MainGame"
;
const
{
ccclass
,
property
}
=
_decorator
;
...
...
@@ -15,11 +18,11 @@ export default class NoPrizePanel extends Panel {
close
:
Node
=
null
!
;
@
property
(
Node
)
cancel
:
Node
=
null
!
;
again
:
Node
=
null
!
;
async
start
()
{
this
.
close
.
on
(
Button
.
EventType
.
CLICK
,
this
.
onClose
,
this
);
this
.
cancel
.
on
(
Button
.
EventType
.
CLICK
,
this
.
onClose
,
this
);
this
.
again
.
on
(
Button
.
EventType
.
CLICK
,
this
.
clickAgain
,
this
);
}
/**
...
...
@@ -30,4 +33,14 @@ export default class NoPrizePanel extends Panel {
this
.
hidePanel
();
}
clickAgain
=
async
()
=>
{
this
.
hidePanel
();
if
(
store
.
homeInfo
.
leftTimes
<=
0
)
{
showToast
(
"没次数啦,明天再来吧!"
);
}
else
{
await
GameMgr
.
ins
.
start
();
changeScene
(
MainGame
);
}
}
}
assets/Scripts/Panels/PrizePanel.ts
View file @
b3a3076d
...
...
@@ -25,7 +25,6 @@ export default class PrizePanel extends Panel {
img
:
Sprite
=
null
!
;
async
start
()
{
console
.
log
(
123123
)
this
.
close
.
on
(
Button
.
EventType
.
CLICK
,
this
.
onClose
,
this
);
this
.
get
.
on
(
Button
.
EventType
.
CLICK
,
this
.
onClose
,
this
);
...
...
assets/resources/NoPrizePanel/NoPrizePanel.prefab
View file @
b3a3076d
...
...
@@ -246,7 +246,7 @@
},
{
"__type__": "cc.Node",
"_name": "
cancel
",
"_name": "
again
",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
...
...
@@ -757,7 +757,7 @@
"close": {
"__id__": 20
},
"
cancel
": {
"
again
": {
"__id__": 10
},
"_id": ""
...
...
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