Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
NJ_MonkyTree
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_MonkyTree
Commits
bbb14568
Commit
bbb14568
authored
Sep 19, 2022
by
liujiangnan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat
parent
5e402b67
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
1 deletion
+38
-1
NJ_MonkyTree.ts
assets/NJ_MonkyTree/scene/NJ_MonkyTree.ts
+38
-1
No files found.
assets/NJ_MonkyTree/scene/NJ_MonkyTree.ts
View file @
bbb14568
...
@@ -133,6 +133,43 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -133,6 +133,43 @@ export default class SceneComponent extends MyCocosSceneComponent {
});
});
}
}
drawTextBorder
(
pname
,
bg
)
{
const
colorObj
=
{
"
level 1
"
:
{
bg_1
:
"
#80bb07
"
,
bg_2
:
"
#80bb07
"
,
bg_3
:
"
#80bb07
"
,
bg_4
:
"
#80bb07
"
,
bg_5
:
"
#80bb07
"
,
bg_6
:
"
#80bb07
"
,
bg_7
:
"
#80bb07
"
,
bg_8
:
"
#80bb07
"
,
},
"
level 2
"
:
{
bg_1
:
"
#00a9b8
"
,
bg_2
:
"
#d63f8d
"
,
bg_3
:
"
#228dcb
"
,
bg_4
:
"
#91c100
"
,
bg_5
:
"
#f34662
"
,
bg_6
:
"
#9765c7
"
,
bg_7
:
"
#00b780
"
,
bg_8
:
"
#e1ba06
"
,
},
"
level 3
"
:
{
bg_1
:
"
#f34662
"
,
bg_2
:
"
#e1ba06
"
,
bg_3
:
"
#9765c7
"
,
bg_4
:
"
#fa7b0b
"
,
bg_5
:
"
#d63f8d
"
,
bg_6
:
"
#228dcb
"
,
bg_7
:
"
#00a9b8
"
,
bg_8
:
"
#91c100
"
,
}
};
return
colorObj
[
pname
]?
colorObj
[
pname
][
bg
]:
"
#80bb07
"
;
}
drawLevelItemPic
(
pname
)
{
drawLevelItemPic
(
pname
)
{
const
_pname
=
pname
.
replace
(
/
\s
+/g
,
""
);
const
_pname
=
pname
.
replace
(
/
\s
+/g
,
""
);
...
@@ -303,7 +340,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -303,7 +340,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
lock
.
active
=
false
;
lock
.
active
=
false
;
const
{
parent
}
=
b
;
const
{
parent
}
=
b
;
const
pa
=
parent
.
getComponent
(
'
Attributes
'
);
const
pa
=
parent
.
getComponent
(
'
Attributes
'
);
const
{
outline
}
=
pa
.
attrMap
;
const
{
outline
}
=
this
.
drawTextBorder
(
pname
,
b
.
name
)
;
const
name
=
lesson
.
name
;
const
name
=
lesson
.
name
;
const
richText
=
titleNode
.
getComponent
(
cc
.
RichText
);
const
richText
=
titleNode
.
getComponent
(
cc
.
RichText
);
...
...
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