Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
middleLayer_for_kyxq
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
middleLayer_for_kyxq
Commits
4cd4c94c
Commit
4cd4c94c
authored
Nov 28, 2023
by
李维
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加获取字体方法
parent
ef721862
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
174 additions
and
2 deletions
+174
-2
.DS_Store
.DS_Store
+0
-0
ms_bold.ttf
assets/middleLayer_for_kyxq/fonts/ms_bold.ttf
+0
-0
ms_bold.ttf.meta
assets/middleLayer_for_kyxq/fonts/ms_bold.ttf.meta
+5
-0
middleLayer_for_kyxq.fire
assets/middleLayer_for_kyxq/scene/middleLayer_for_kyxq.fire
+160
-2
middleLayer.ts
assets/middleLayer_for_kyxq/script/middleLayer.ts
+9
-0
No files found.
.DS_Store
View file @
4cd4c94c
No preview for this file type
assets/middleLayer_for_kyxq/fonts/ms_bold.ttf
0 → 100644
View file @
4cd4c94c
File added
assets/middleLayer_for_kyxq/fonts/ms_bold.ttf.meta
0 → 100644
View file @
4cd4c94c
{
"ver": "1.1.0",
"uuid": "4342162b-829c-4ccb-af5e-e9ad4b6f5af0",
"subMetas": {}
}
\ No newline at end of file
assets/middleLayer_for_kyxq/scene/middleLayer_for_kyxq.fire
View file @
4cd4c94c
...
@@ -335,10 +335,10 @@
...
@@ -335,10 +335,10 @@
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 9
6
"__id__": 9
9
},
},
{
{
"__id__":
97
"__id__":
100
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -3180,6 +3180,9 @@
...
@@ -3180,6 +3180,9 @@
},
},
{
{
"__id__": 87
"__id__": 87
},
{
"__id__": 96
}
}
],
],
"_active": false,
"_active": false,
...
@@ -4243,6 +4246,161 @@
...
@@ -4243,6 +4246,161 @@
"preload": false,
"preload": false,
"_id": "c7wSKx4xVIyYgtbXtj2vvD"
"_id": "c7wSKx4xVIyYgtbXtj2vvD"
},
},
{
"__type__": "cc.Node",
"_name": "font",
"_objFlags": 0,
"_parent": {
"__id__": 75
},
"_children": [
{
"__id__": 97
}
],
"_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": "b5C8ulhRdOdIt0xfcjHkH9"
},
{
"__type__": "cc.Node",
"_name": "ms_bold",
"_objFlags": 0,
"_parent": {
"__id__": 96
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 98
}
],
"_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": "33F9uuJn1CP76AhgkzB5qO"
},
{
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 97
},
"_enabled": true,
"_materials": [],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_string": "",
"_N$string": "",
"_fontSize": 40,
"_lineHeight": 40,
"_enableWrapText": true,
"_N$file": {
"__uuid__": "4342162b-829c-4ccb-af5e-e9ad4b6f5af0"
},
"_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": "cagPVzHylKWaCzIRfF2/Wv"
},
{
{
"__type__": "cc.Widget",
"__type__": "cc.Widget",
"_name": "",
"_name": "",
...
...
assets/middleLayer_for_kyxq/script/middleLayer.ts
View file @
4cd4c94c
...
@@ -83,6 +83,15 @@ export default class MiddleLayerClass extends middleLayerBase {
...
@@ -83,6 +83,15 @@ export default class MiddleLayerClass extends middleLayerBase {
// }, 2000);
// }, 2000);
}
}
getFont
(
fontName
)
{
const
fN
=
cc
.
find
(
`middleLayer/res/font/
${
fontName
}
`
)
if
(
fN
)
{
return
fN
.
getComponent
(
cc
.
Label
).
font
}
else
{
return
null
}
}
saveAnswer
(
data
)
{
saveAnswer
(
data
)
{
return
new
Promise
(
resovle
=>
{
return
new
Promise
(
resovle
=>
{
this
.
callNetworkApiPost
(
`/api/kyxq/v1/user/saveanswer`
,
{
this
.
callNetworkApiPost
(
`/api/kyxq/v1/user/saveanswer`
,
{
...
...
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