Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
MingSnake_241120
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
MingSnake_241120
Commits
6f16e9d0
Commit
6f16e9d0
authored
Dec 12, 2024
by
陈子煜
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
f6a7549d
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
948 additions
and
696 deletions
+948
-696
GetPrize.prefab
assets/Bundles/GetPrize/GetPrize.prefab
+929
-693
GetPrize.ts
assets/Scripts/Panels/GetPrize.ts
+19
-3
No files found.
assets/Bundles/GetPrize/GetPrize.prefab
View file @
6f16e9d0
This diff is collapsed.
Click to expand it.
assets/Scripts/Panels/GetPrize.ts
View file @
6f16e9d0
...
@@ -26,6 +26,9 @@ export default class GetPrize extends Panel {
...
@@ -26,6 +26,9 @@ export default class GetPrize extends Panel {
@
property
(
Node
)
content
:
Node
=
null
;
@
property
(
Node
)
content
:
Node
=
null
;
@
property
(
Node
)
svga
:
Node
=
null
;
@
property
(
Node
)
bg
:
Node
=
null
;
onLoad
()
{
onLoad
()
{
this
.
happy
.
on
(
Button
.
EventType
.
CLICK
,
this
.
clickHappy
,
this
);
this
.
happy
.
on
(
Button
.
EventType
.
CLICK
,
this
.
clickHappy
,
this
);
this
.
share
.
on
(
Button
.
EventType
.
CLICK
,
this
.
clickShare
,
this
);
this
.
share
.
on
(
Button
.
EventType
.
CLICK
,
this
.
clickShare
,
this
);
...
@@ -34,8 +37,8 @@ export default class GetPrize extends Panel {
...
@@ -34,8 +37,8 @@ export default class GetPrize extends Panel {
async
start
()
{
async
start
()
{
const
{
data
=
this
.
data
}
=
this
.
data
const
{
data
=
this
.
data
}
=
this
.
data
console
.
log
(
data
,
112233
)
console
.
log
(
data
,
112233
)
console
.
log
(
data
.
prizeName
,
22222
)
console
.
log
(
data
.
prizeName
,
22222
)
data
.
map
((
item
,
index
)
=>
{
data
.
map
((
item
,
index
)
=>
{
const
prize
=
instantiate
(
this
.
prizePrefab
)
const
prize
=
instantiate
(
this
.
prizePrefab
)
...
@@ -49,12 +52,25 @@ export default class GetPrize extends Panel {
...
@@ -49,12 +52,25 @@ export default class GetPrize extends Panel {
const
numBg
=
prize
.
getChildByName
(
"numBg"
)
const
numBg
=
prize
.
getChildByName
(
"numBg"
)
const
num
=
numBg
.
getChildByName
(
"num"
)
const
num
=
numBg
.
getChildByName
(
"num"
)
num
.
getComponent
(
Label
).
string
=
`X
${
item
.
sendCount
}
`
num
.
getComponent
(
Label
).
string
=
`X
${
item
.
sendCount
}
`
})
this
.
bg
.
active
=
false
;
this
.
svga
.
active
=
true
setTimeout
(()
=>
{
this
.
bg
.
active
=
true
this
.
svga
.
active
=
false
},
1000
)
})
}
}
change
(){
this
.
bg
.
active
=
true
this
.
svga
.
active
=
false
}
clickShare
()
{
clickShare
()
{
showPanel
(
SharePop
,
{
showPanel
(
SharePop
,
{
prizeName
:
this
.
data
[
0
].
prizeName
,
prizeName
:
this
.
data
[
0
].
prizeName
,
...
...
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