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
a66129e0
Commit
a66129e0
authored
Sep 15, 2022
by
limingzhe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: debug 按钮字体
parent
849a0a81
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
262 additions
and
16 deletions
+262
-16
NJ_MonkyTree.meta
assets/NJ_MonkyTree.meta
+21
-1
NJ_MonkyTree.fire
assets/NJ_MonkyTree/scene/NJ_MonkyTree.fire
+226
-2
NJ_MonkyTree.ts
assets/NJ_MonkyTree/scene/NJ_MonkyTree.ts
+15
-13
No files found.
assets/NJ_MonkyTree.meta
View file @
a66129e0
{"ver":"1.1.2","uuid":"b4b62bd3-1442-4e7e-8b59-38c0f3bf6c52","isBundle":false,"bundleName":"","priority":1,"compressionType":{"android":"default"},"optimizeHotUpdate":{"android":true},"inlineSpriteFrames":{"android":false},"isRemoteBundle":{"ios":false,"android":false},"subMetas":{}}
\ No newline at end of file
{
"ver": "1.1.2",
"uuid": "b4b62bd3-1442-4e7e-8b59-38c0f3bf6c52",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {
"android": "default"
},
"optimizeHotUpdate": {
"android": true
},
"inlineSpriteFrames": {
"android": false
},
"isRemoteBundle": {
"ios": false,
"android": false
},
"subMetas": {}
}
\ No newline at end of file
assets/NJ_MonkyTree/scene/NJ_MonkyTree.fire
View file @
a66129e0
...
...
@@ -73,15 +73,18 @@
},
{
"__id__": 5
},
{
"__id__": 421
}
],
"_active": true,
"_components": [
{
"__id__": 42
1
"__id__": 42
5
},
{
"__id__": 42
2
"__id__": 42
6
}
],
"_prefab": null,
...
...
@@ -17723,6 +17726,227 @@
],
"_id": "dbT6tMZutH/Y58xXsjUXqp"
},
{
"__type__": "cc.Node",
"_name": "res",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [
{
"__id__": 422
}
],
"_active": false,
"_components": [],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "04MQ3fPiNFZZVQ0bmj1Bnx"
},
{
"__type__": "cc.Node",
"_name": "font",
"_objFlags": 0,
"_parent": {
"__id__": 421
},
"_children": [
{
"__id__": 423
}
],
"_active": true,
"_components": [],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 0
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "6051dFmZJP/bLa9po3KKoh"
},
{
"__type__": "cc.Node",
"_name": "BRLNSDB",
"_objFlags": 0,
"_parent": {
"__id__": 422
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 424
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 0,
"height": 50.4
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
0,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "dfq8GjBcpHLJ+iFxN4OK7V"
},
{
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 423
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_string": "",
"_N$string": "",
"_fontSize": 40,
"_lineHeight": 40,
"_enableWrapText": true,
"_N$file": {
"__uuid__": "c551970e-b095-45f3-9f1d-25cde8b8deb1"
},
"_isSystemFontUsed": false,
"_spacingX": 0,
"_batchAsBitmap": false,
"_styleFlags": 0,
"_underlineHeight": 0,
"_N$horizontalAlign": 0,
"_N$verticalAlign": 0,
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "2eXQdeVrRKkKLJ9ROFJKCL"
},
{
"__type__": "cc.Canvas",
"_name": "",
...
...
assets/NJ_MonkyTree/scene/NJ_MonkyTree.ts
View file @
a66129e0
...
...
@@ -204,19 +204,20 @@ export default class SceneComponent extends MyCocosSceneComponent {
lock
.
active
=
true
;
const
titleNode
=
attr
.
querySelector
(
'
.title
'
);
// const outline = '#000';
// const name = "";
// const richText = titleNode.getComponent(cc.RichText);
// if ( !richText.fontSizeBase ) {
// richText.fontSizeBase = richText.fontSize;
// }
// richText.fontSize = richText.fontSizeBase;
// if (name.length > 14) {
// richText.fontSize = richText.fontSizeBase * 0.7;
// }
const
outline
=
'
#000
'
;
const
name
=
""
;
const
richText
=
titleNode
.
getComponent
(
cc
.
RichText
);
if
(
!
richText
.
fontSizeBase
)
{
richText
.
fontSizeBase
=
richText
.
fontSize
;
}
richText
.
fontSize
=
richText
.
fontSizeBase
;
if
(
name
.
length
>
14
)
{
richText
.
fontSize
=
richText
.
fontSizeBase
*
0.7
;
}
richText
.
font
=
cc
.
find
(
"
Canvas/res/font/BRLNSDB
"
).
getComponent
(
cc
.
Label
).
font
;
//
titleNode.getComponent(cc.RichText).string = `<outline align=top color=${outline}
//
width=4>${name}</outline>`
titleNode
.
getComponent
(
cc
.
RichText
).
string
=
`<outline align=top color=
${
outline
}
width=4>
${
name
}
</outline>`
});
...
...
@@ -272,10 +273,11 @@ export default class SceneComponent extends MyCocosSceneComponent {
if
(
name
.
length
>
14
)
{
richText
.
fontSize
=
richText
.
fontSizeBase
*
0.7
;
}
richText
.
font
=
cc
.
find
(
"
Canvas/res/font/BRLNSDB
"
).
getComponent
(
cc
.
Label
).
font
;
titleNode
.
getComponent
(
cc
.
RichText
).
string
=
`<outline align=top color=
${
outline
}
width=4>
${
name
}
</outline>`
;
delayCall
(
0.2
,
()
=>
{
titleNode
.
getComponent
(
cc
.
RichText
).
string
=
`<outline align=top color=
${
outline
}
width=4>
${
name
}
</outline>`
;
...
...
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