Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
H
hzlh-beautifulFunFestival-snake-20241222
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
hzlh-beautifulFunFestival-snake-20241222
Commits
accdab78
Commit
accdab78
authored
Dec 25, 2024
by
俞嘉婷
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 主按钮次数不足 置灰处理
parent
c90c082f
Changes
3
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
265 additions
and
254 deletions
+265
-254
runMainPage.scene
...ake-20241222/assets/Bundles/runMainPage/runMainPage.scene
+254
-249
TaskPanel.ts
...ake-20241222/assets/Scripts/Panels/TaskPanel/TaskPanel.ts
+1
-1
runMainPage.ts
...ake-20241222/assets/Scripts/Scenes/runMain/runMainPage.ts
+10
-4
No files found.
hzlh-beautifulFunFestival-snake-20241222/assets/Bundles/runMainPage/runMainPage.scene
View file @
accdab78
This diff is collapsed.
Click to expand it.
hzlh-beautifulFunFestival-snake-20241222/assets/Scripts/Panels/TaskPanel/TaskPanel.ts
View file @
accdab78
...
...
@@ -81,7 +81,7 @@ export class TaskPanel extends Panel {
}
updateTaskInfo
=
async
()
=>
{
const
{
boolLogin
}
=
this
.
data
;
const
{
boolLogin
}
=
getWebData
(
WebNetName
.
tcs_Index
).
data
||
{}
;
const
[
taskRes
]
=
await
Promise
.
all
([
sendWebNet
(
WebNetName
.
queryTasks
,
{
branchType
:
store
.
BRANCH_TYPE
}),
]);
...
...
hzlh-beautifulFunFestival-snake-20241222/assets/Scripts/Scenes/runMain/runMainPage.ts
View file @
accdab78
...
...
@@ -47,6 +47,11 @@ export class runMainPage extends Scene {
@
property
(
Node
)
guide1
:
Node
=
null
;
// 主按钮 高亮态
@
property
(
SpriteFrame
)
mainBtnSF
:
SpriteFrame
=
null
;
// 主按钮 置灰态
@
property
(
SpriteFrame
)
mainBtnGreySF
:
SpriteFrame
=
null
;
private
static
_ins
:
runMainPage
=
null
;
...
...
@@ -71,6 +76,8 @@ export class runMainPage extends Scene {
const
{
success
,
data
}
=
await
sendWebNet
(
WebNetName
.
tcs_Index
);
if
(
success
)
{
this
.
startLab
.
string
=
`剩余次数:
${
data
.
remainJoinNum
||
0
}
`
// 主按钮置灰处理
this
.
startBtn
.
getComponent
(
Sprite
).
spriteFrame
=
data
.
remainJoinNum
>
0
?
this
.
mainBtnSF
:
this
.
mainBtnGreySF
;
// 新手引导1
if
(
data
.
alreadyGuide
==
0
)
{
this
.
guide1
.
active
=
true
...
...
@@ -105,9 +112,7 @@ export class runMainPage extends Scene {
})
click_Task
=
_asyncThrottle
(()
=>
{
showPanel
(
TaskPanel
,
{
boolLogin
:
getWebData
(
WebNetName
.
tcs_Index
).
data
?.
boolLogin
,
})
showPanel
(
TaskPanel
)
})
click_startGame
=
_asyncThrottle
(
async
()
=>
{
const
{
data
,
timeStamp
}
=
getWebData
(
WebNetName
.
tcs_Index
)
||
{};
...
...
@@ -138,7 +143,8 @@ export class runMainPage extends Scene {
return
}
if
(
remainJoinNum
<=
0
)
{
showToast
(
"快去完成任务增加游戏次数吧~"
)
showToast
(
"当前无游戏机会,任务可获得更多游戏机会哦~"
)
showPanel
(
TaskPanel
)
return
false
}
...
...
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