Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
NJ_usercenter
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
template admin
NJ_usercenter
Commits
a2691718
Commit
a2691718
authored
Jun 21, 2022
by
liujiangnan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 评语
parent
4882ef2e
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
60 additions
and
51 deletions
+60
-51
NJ_usercenter.fire
assets/NJ_usercenter/scene/NJ_usercenter.fire
+50
-50
clickEvent.ts
assets/NJ_usercenter/script/clickEvent.ts
+10
-1
No files found.
assets/NJ_usercenter/scene/NJ_usercenter.fire
View file @
a2691718
This diff is collapsed.
Click to expand it.
assets/NJ_usercenter/script/clickEvent.ts
View file @
a2691718
...
...
@@ -210,6 +210,8 @@ export default class NewClass extends cc.Component {
for
(
let
i
=
0
;
i
<
3
;
i
++
)
{
cc
.
find
(
`result_bg/star_
${
i
+
1
}
_light`
,
qpyNode
).
active
=
false
;
}
const
label
=
cc
.
find
(
`result_bg/textnode/label`
,
qpyNode
).
getComponent
(
cc
.
Label
);
label
.
string
=
""
;
}
...
...
@@ -342,7 +344,6 @@ export default class NewClass extends cc.Component {
if
(
OP_06_3
)
{
const
rowData
=
JSON
.
parse
(
OP_06_3
);
cc
.
find
(
`Canvas/videoContainer`
).
attr
({
rowData
});
// TODO 星星算法和评语
let
lightStarCount
=
0
;
rowData
.
item_arr
.
forEach
(
row
=>
{
lightStarCount
+=
row
.
star_count
;
...
...
@@ -351,6 +352,14 @@ export default class NewClass extends cc.Component {
for
(
let
i
=
0
;
i
<
lightStarCount
;
i
++
)
{
cc
.
find
(
`result_bg/star_
${
i
+
1
}
_light`
,
qpyNode
).
active
=
true
;
}
const
label
=
cc
.
find
(
`result_bg/textnode/label`
,
qpyNode
).
getComponent
(
cc
.
Label
);
if
(
lightStarCount
==
0
||
lightStarCount
==
1
)
{
label
.
string
=
`再多听听原声,\n大声录音让我听到,\n争取拿到三颗星!`
;
}
else
if
(
lightStarCount
==
2
)
{
label
.
string
=
`宝贝的发音很好哦\n差一点点就完美了~\n多试几次,\n争取拿到三颗星!`
;
}
else
{
label
.
string
=
`宝贝的发音太好了!\n再接再厉呀!`
;
}
qpyNode
.
active
=
true
;
}
else
{
qpyNode
.
active
=
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