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
8008a076
Commit
8008a076
authored
Jun 08, 2022
by
liujiangnan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 加锁
parent
7fdcd5bf
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
2121 additions
and
28722 deletions
+2121
-28722
NJ_usercenter.fire
assets/NJ_usercenter/scene/NJ_usercenter.fire
+2066
-28722
NJ_usercenter.ts
assets/NJ_usercenter/scene/NJ_usercenter.ts
+3
-0
clickEvent.ts
assets/NJ_usercenter/script/clickEvent.ts
+16
-0
lock_1.png
assets/NJ_usercenter/textures/learnreport/lock_1.png
+0
-0
lock_1.png.meta
assets/NJ_usercenter/textures/learnreport/lock_1.png.meta
+36
-0
No files found.
assets/NJ_usercenter/scene/NJ_usercenter.fire
View file @
8008a076
This diff is collapsed.
Click to expand it.
assets/NJ_usercenter/scene/NJ_usercenter.ts
View file @
8008a076
...
@@ -79,6 +79,9 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -79,6 +79,9 @@ export default class SceneComponent extends MyCocosSceneComponent {
cc
.
find
(
"
Canvas/usercenter/view/content/scollpage/learning
"
).
getComponent
(
cc
.
RichText
).
string
=
`<color=#138977>当前正在学习</c> <color=#ef8d36>
${
gameNames
[
0
]}
-
${
gameNames
[
1
]}
</color>`
;
cc
.
find
(
"
Canvas/usercenter/view/content/scollpage/learning
"
).
getComponent
(
cc
.
RichText
).
string
=
`<color=#138977>当前正在学习</c> <color=#ef8d36>
${
gameNames
[
0
]}
-
${
gameNames
[
1
]}
</color>`
;
}
}
// 解锁的级别
}
}
// 学习小结
// 学习小结
...
...
assets/NJ_usercenter/script/clickEvent.ts
View file @
8008a076
...
@@ -80,6 +80,17 @@ export default class NewClass extends cc.Component {
...
@@ -80,6 +80,17 @@ export default class NewClass extends cc.Component {
const
node
=
cc
.
find
(
"
Canvas/learnreport
"
);
const
node
=
cc
.
find
(
"
Canvas/learnreport
"
);
cc
.
find
(
"
typeLabel
"
,
node
).
getComponent
(
cc
.
Label
).
string
=
this
.
reportObj
[
this
.
reportType
];
cc
.
find
(
"
typeLabel
"
,
node
).
getComponent
(
cc
.
Label
).
string
=
this
.
reportObj
[
this
.
reportType
];
// 设置每个级别激活状态(是否显示锁头)
const
levelIds
=
levels
[
this
.
reportType
].
map
(
item
=>
item
.
id
);
const
unLocks
=
this
.
getUnlockSyllabuses
();
for
(
let
i
=
1
;
i
<
5
;
i
++
)
{
const
id
=
levelIds
[
i
];
if
(
id
&&
unLocks
.
includes
(
id
))
{
cc
.
find
(
`level
${
i
+
1
}
/lock_1`
,
node
).
active
=
false
;
}
else
{
cc
.
find
(
`level
${
i
+
1
}
/lock_1`
,
node
).
active
=
true
;
}
}
// 激活索引为0的Level
// 激活索引为0的Level
await
this
.
drawPageItems
(
0
);
await
this
.
drawPageItems
(
0
);
}
}
...
@@ -153,6 +164,11 @@ export default class NewClass extends cc.Component {
...
@@ -153,6 +164,11 @@ export default class NewClass extends cc.Component {
return
;
return
;
}
}
this
.
userInfo
=
JSON
.
parse
(
userInfo
);
this
.
userInfo
=
JSON
.
parse
(
userInfo
);
const
lockedNode
=
cc
.
find
(
`Canvas/learnreport/level
${
index
+
1
}
/lock_1`
);
if
(
lockedNode
&&
lockedNode
.
active
)
{
return
;
}
this
.
activeLevelIndex
(
parseInt
(
index
));
this
.
activeLevelIndex
(
parseInt
(
index
));
await
this
.
drawPageItems
(
parseInt
(
index
));
await
this
.
drawPageItems
(
parseInt
(
index
));
...
...
assets/NJ_usercenter/textures/learnreport/lock_1.png
0 → 100644
View file @
8008a076
1.6 KB
assets/NJ_usercenter/textures/learnreport/lock_1.png.meta
0 → 100644
View file @
8008a076
{
"ver": "2.3.5",
"uuid": "45220650-c98e-4c32-95b5-564808f0ea73",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 35,
"height": 41,
"platformSettings": {},
"subMetas": {
"lock_1": {
"ver": "1.0.4",
"uuid": "9d2b8f92-9518-494f-a0d6-f93d4a5d25c4",
"rawTextureUuid": "45220650-c98e-4c32-95b5-564808f0ea73",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 35,
"height": 41,
"rawWidth": 35,
"rawHeight": 41,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ 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