Compare commits
28 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| e98a23778b | |||
| 3e15603f17 | |||
| adbf4faed0 | |||
| 1851b2d959 | |||
| 895287b145 | |||
| 4104adf0f7 | |||
| da9f2bfbf8 | |||
| 1d81901b6a | |||
| 6a5ba19e3d | |||
| 6ee71adb4c | |||
| ba8a5f95a9 | |||
| 98e9d62db7 | |||
| c3a9b4f4b4 | |||
| 78546e6a7d | |||
| d7c00a42f2 | |||
| 6eb39e0791 | |||
| 2e0f682a8e | |||
| 91ed3138e9 | |||
| d3b098a8df | |||
| 22a797de2f | |||
| 216aaa6b7f | |||
| 7a30cda99e | |||
| dfc3aa53ce | |||
| 770f8c7bda | |||
| 7e227cd2b6 | |||
| d66733510a | |||
| 5bc2daaee5 | |||
| d956f3d413 |
@ -2,7 +2,7 @@
|
||||
"ver": "1.2.0",
|
||||
"importer": "directory",
|
||||
"imported": true,
|
||||
"uuid": "fd645b06-0a2b-44e9-8721-9e8590e81e15",
|
||||
"uuid": "d4d56f7c-d44b-41dc-aea7-0db93e48b08b",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
BIN
assets/Icons/morphQex/morph1.png
Normal file
|
After Width: | Height: | Size: 471 B |
134
assets/Icons/morphQex/morph1.png.meta
Normal file
@ -0,0 +1,134 @@
|
||||
{
|
||||
"ver": "1.0.27",
|
||||
"importer": "image",
|
||||
"imported": true,
|
||||
"uuid": "1788b2a1-dfef-4811-983e-c90103a790e4",
|
||||
"files": [
|
||||
".json",
|
||||
".png"
|
||||
],
|
||||
"subMetas": {
|
||||
"6c48a": {
|
||||
"importer": "texture",
|
||||
"uuid": "1788b2a1-dfef-4811-983e-c90103a790e4@6c48a",
|
||||
"displayName": "morph1",
|
||||
"id": "6c48a",
|
||||
"name": "texture",
|
||||
"userData": {
|
||||
"wrapModeS": "clamp-to-edge",
|
||||
"wrapModeT": "clamp-to-edge",
|
||||
"minfilter": "linear",
|
||||
"magfilter": "linear",
|
||||
"mipfilter": "none",
|
||||
"anisotropy": 0,
|
||||
"isUuid": true,
|
||||
"imageUuidOrDatabaseUri": "1788b2a1-dfef-4811-983e-c90103a790e4",
|
||||
"visible": false
|
||||
},
|
||||
"ver": "1.0.22",
|
||||
"imported": true,
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {}
|
||||
},
|
||||
"f9941": {
|
||||
"importer": "sprite-frame",
|
||||
"uuid": "1788b2a1-dfef-4811-983e-c90103a790e4@f9941",
|
||||
"displayName": "morph1",
|
||||
"id": "f9941",
|
||||
"name": "spriteFrame",
|
||||
"userData": {
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0.5,
|
||||
"trimX": 7,
|
||||
"trimY": 5,
|
||||
"width": 18,
|
||||
"height": 21,
|
||||
"rawWidth": 32,
|
||||
"rawHeight": 32,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"packable": true,
|
||||
"pixelsToUnit": 100,
|
||||
"pivotX": 0.5,
|
||||
"pivotY": 0.5,
|
||||
"meshType": 0,
|
||||
"vertices": {
|
||||
"rawPosition": [
|
||||
-9,
|
||||
-10.5,
|
||||
0,
|
||||
9,
|
||||
-10.5,
|
||||
0,
|
||||
-9,
|
||||
10.5,
|
||||
0,
|
||||
9,
|
||||
10.5,
|
||||
0
|
||||
],
|
||||
"indexes": [
|
||||
0,
|
||||
1,
|
||||
2,
|
||||
2,
|
||||
1,
|
||||
3
|
||||
],
|
||||
"uv": [
|
||||
7,
|
||||
27,
|
||||
25,
|
||||
27,
|
||||
7,
|
||||
6,
|
||||
25,
|
||||
6
|
||||
],
|
||||
"nuv": [
|
||||
0.21875,
|
||||
0.1875,
|
||||
0.78125,
|
||||
0.1875,
|
||||
0.21875,
|
||||
0.84375,
|
||||
0.78125,
|
||||
0.84375
|
||||
],
|
||||
"minPos": [
|
||||
-9,
|
||||
-10.5,
|
||||
0
|
||||
],
|
||||
"maxPos": [
|
||||
9,
|
||||
10.5,
|
||||
0
|
||||
]
|
||||
},
|
||||
"isUuid": true,
|
||||
"imageUuidOrDatabaseUri": "1788b2a1-dfef-4811-983e-c90103a790e4@6c48a",
|
||||
"atlasUuid": ""
|
||||
},
|
||||
"ver": "1.0.12",
|
||||
"imported": true,
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {}
|
||||
}
|
||||
},
|
||||
"userData": {
|
||||
"hasAlpha": true,
|
||||
"type": "sprite-frame",
|
||||
"fixAlphaTransparencyArtifacts": false,
|
||||
"redirect": "1788b2a1-dfef-4811-983e-c90103a790e4@6c48a"
|
||||
}
|
||||
}
|
||||
BIN
assets/Icons/morphQex/qex.png
Normal file
|
After Width: | Height: | Size: 413 B |
134
assets/Icons/morphQex/qex.png.meta
Normal file
@ -0,0 +1,134 @@
|
||||
{
|
||||
"ver": "1.0.27",
|
||||
"importer": "image",
|
||||
"imported": true,
|
||||
"uuid": "5aaba3c0-d9f0-40c6-a2e3-9a10e2969775",
|
||||
"files": [
|
||||
".json",
|
||||
".png"
|
||||
],
|
||||
"subMetas": {
|
||||
"6c48a": {
|
||||
"importer": "texture",
|
||||
"uuid": "5aaba3c0-d9f0-40c6-a2e3-9a10e2969775@6c48a",
|
||||
"displayName": "qex",
|
||||
"id": "6c48a",
|
||||
"name": "texture",
|
||||
"userData": {
|
||||
"wrapModeS": "clamp-to-edge",
|
||||
"wrapModeT": "clamp-to-edge",
|
||||
"minfilter": "linear",
|
||||
"magfilter": "linear",
|
||||
"mipfilter": "none",
|
||||
"anisotropy": 0,
|
||||
"isUuid": true,
|
||||
"imageUuidOrDatabaseUri": "5aaba3c0-d9f0-40c6-a2e3-9a10e2969775",
|
||||
"visible": false
|
||||
},
|
||||
"ver": "1.0.22",
|
||||
"imported": true,
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {}
|
||||
},
|
||||
"f9941": {
|
||||
"importer": "sprite-frame",
|
||||
"uuid": "5aaba3c0-d9f0-40c6-a2e3-9a10e2969775@f9941",
|
||||
"displayName": "qex",
|
||||
"id": "f9941",
|
||||
"name": "spriteFrame",
|
||||
"userData": {
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 0,
|
||||
"trimY": 0,
|
||||
"width": 13,
|
||||
"height": 21,
|
||||
"rawWidth": 13,
|
||||
"rawHeight": 21,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"packable": true,
|
||||
"pixelsToUnit": 100,
|
||||
"pivotX": 0.5,
|
||||
"pivotY": 0.5,
|
||||
"meshType": 0,
|
||||
"vertices": {
|
||||
"rawPosition": [
|
||||
-6.5,
|
||||
-10.5,
|
||||
0,
|
||||
6.5,
|
||||
-10.5,
|
||||
0,
|
||||
-6.5,
|
||||
10.5,
|
||||
0,
|
||||
6.5,
|
||||
10.5,
|
||||
0
|
||||
],
|
||||
"indexes": [
|
||||
0,
|
||||
1,
|
||||
2,
|
||||
2,
|
||||
1,
|
||||
3
|
||||
],
|
||||
"uv": [
|
||||
0,
|
||||
21,
|
||||
13,
|
||||
21,
|
||||
0,
|
||||
0,
|
||||
13,
|
||||
0
|
||||
],
|
||||
"nuv": [
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
1,
|
||||
1
|
||||
],
|
||||
"minPos": [
|
||||
-6.5,
|
||||
-10.5,
|
||||
0
|
||||
],
|
||||
"maxPos": [
|
||||
6.5,
|
||||
10.5,
|
||||
0
|
||||
]
|
||||
},
|
||||
"isUuid": true,
|
||||
"imageUuidOrDatabaseUri": "5aaba3c0-d9f0-40c6-a2e3-9a10e2969775@6c48a",
|
||||
"atlasUuid": ""
|
||||
},
|
||||
"ver": "1.0.12",
|
||||
"imported": true,
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {}
|
||||
}
|
||||
},
|
||||
"userData": {
|
||||
"hasAlpha": true,
|
||||
"type": "sprite-frame",
|
||||
"fixAlphaTransparencyArtifacts": false,
|
||||
"redirect": "5aaba3c0-d9f0-40c6-a2e3-9a10e2969775@6c48a"
|
||||
}
|
||||
}
|
||||
BIN
assets/Icons/morphQex/x.png
Normal file
|
After Width: | Height: | Size: 357 B |
134
assets/Icons/morphQex/x.png.meta
Normal file
@ -0,0 +1,134 @@
|
||||
{
|
||||
"ver": "1.0.27",
|
||||
"importer": "image",
|
||||
"imported": true,
|
||||
"uuid": "a614fdf0-1d85-4032-8b5c-7265394beb85",
|
||||
"files": [
|
||||
".json",
|
||||
".png"
|
||||
],
|
||||
"subMetas": {
|
||||
"6c48a": {
|
||||
"importer": "texture",
|
||||
"uuid": "a614fdf0-1d85-4032-8b5c-7265394beb85@6c48a",
|
||||
"displayName": "x",
|
||||
"id": "6c48a",
|
||||
"name": "texture",
|
||||
"userData": {
|
||||
"wrapModeS": "clamp-to-edge",
|
||||
"wrapModeT": "clamp-to-edge",
|
||||
"minfilter": "linear",
|
||||
"magfilter": "linear",
|
||||
"mipfilter": "none",
|
||||
"anisotropy": 0,
|
||||
"isUuid": true,
|
||||
"imageUuidOrDatabaseUri": "a614fdf0-1d85-4032-8b5c-7265394beb85",
|
||||
"visible": false
|
||||
},
|
||||
"ver": "1.0.22",
|
||||
"imported": true,
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {}
|
||||
},
|
||||
"f9941": {
|
||||
"importer": "sprite-frame",
|
||||
"uuid": "a614fdf0-1d85-4032-8b5c-7265394beb85@f9941",
|
||||
"displayName": "x",
|
||||
"id": "f9941",
|
||||
"name": "spriteFrame",
|
||||
"userData": {
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 0,
|
||||
"trimY": 0,
|
||||
"width": 17,
|
||||
"height": 17,
|
||||
"rawWidth": 17,
|
||||
"rawHeight": 17,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"packable": true,
|
||||
"pixelsToUnit": 100,
|
||||
"pivotX": 0.5,
|
||||
"pivotY": 0.5,
|
||||
"meshType": 0,
|
||||
"vertices": {
|
||||
"rawPosition": [
|
||||
-8.5,
|
||||
-8.5,
|
||||
0,
|
||||
8.5,
|
||||
-8.5,
|
||||
0,
|
||||
-8.5,
|
||||
8.5,
|
||||
0,
|
||||
8.5,
|
||||
8.5,
|
||||
0
|
||||
],
|
||||
"indexes": [
|
||||
0,
|
||||
1,
|
||||
2,
|
||||
2,
|
||||
1,
|
||||
3
|
||||
],
|
||||
"uv": [
|
||||
0,
|
||||
17,
|
||||
17,
|
||||
17,
|
||||
0,
|
||||
0,
|
||||
17,
|
||||
0
|
||||
],
|
||||
"nuv": [
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
1,
|
||||
1
|
||||
],
|
||||
"minPos": [
|
||||
-8.5,
|
||||
-8.5,
|
||||
0
|
||||
],
|
||||
"maxPos": [
|
||||
8.5,
|
||||
8.5,
|
||||
0
|
||||
]
|
||||
},
|
||||
"isUuid": true,
|
||||
"imageUuidOrDatabaseUri": "a614fdf0-1d85-4032-8b5c-7265394beb85@6c48a",
|
||||
"atlasUuid": ""
|
||||
},
|
||||
"ver": "1.0.12",
|
||||
"imported": true,
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {}
|
||||
}
|
||||
},
|
||||
"userData": {
|
||||
"hasAlpha": true,
|
||||
"type": "sprite-frame",
|
||||
"fixAlphaTransparencyArtifacts": false,
|
||||
"redirect": "a614fdf0-1d85-4032-8b5c-7265394beb85@6c48a"
|
||||
}
|
||||
}
|
||||
50
assets/Images/logo2vnuzu1_image1.svg
Normal file
|
After Width: | Height: | Size: 1.3 MiB |
12
assets/Images/logo2vnuzu1_image1.svg.meta
Normal file
@ -0,0 +1,12 @@
|
||||
{
|
||||
"ver": "1.0.0",
|
||||
"importer": "*",
|
||||
"imported": true,
|
||||
"uuid": "f92b4a5a-5593-49bd-a152-7bf8ef56e928",
|
||||
"files": [
|
||||
".json",
|
||||
".svg"
|
||||
],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
||||
58
assets/Images/logo2vnuzu1_text1.svg
Normal file
@ -0,0 +1,58 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
version="1.1"
|
||||
id="svg1"
|
||||
width="851.72156"
|
||||
height="97.743721"
|
||||
viewBox="0 0 851.72158 97.743723"
|
||||
sodipodi:docname="logo2vnuzu.png"
|
||||
inkscape:export-batch-path="D:\Projects\yantar\assets\Images"
|
||||
inkscape:export-batch-name="logo2vnuzu1"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg">
|
||||
<defs
|
||||
id="defs1">
|
||||
<rect
|
||||
x="348.91919"
|
||||
y="985.12054"
|
||||
width="900.3869"
|
||||
height="121.36035"
|
||||
id="rect2" />
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
id="namedview1"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#000000"
|
||||
borderopacity="0.25"
|
||||
inkscape:showpageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pagecheckerboard="0"
|
||||
inkscape:deskcolor="#d1d1d1">
|
||||
<inkscape:page
|
||||
x="0"
|
||||
y="0"
|
||||
width="851.72156"
|
||||
height="97.743721"
|
||||
id="page1"
|
||||
margin="0"
|
||||
bleed="0" />
|
||||
</sodipodi:namedview>
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
inkscape:label="Image"
|
||||
id="g1"
|
||||
transform="translate(-271.49887,-1033.3751)">
|
||||
<text
|
||||
xml:space="preserve"
|
||||
id="text1"
|
||||
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:96px;font-family:Ubuntu;-inkscape-font-specification:'Ubuntu, Bold';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:start;writing-mode:lr-tb;direction:ltr;white-space:pre;shape-inside:url(#rect2);fill:#000000"
|
||||
transform="matrix(1.0618908,0,0,1.1388856,-107.17131,-113.00025)"><tspan
|
||||
x="348.91992"
|
||||
y="1074.6403"
|
||||
id="tspan1">ПОДГРУЖАЕМ ...</tspan></text>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.9 KiB |
12
assets/Images/logo2vnuzu1_text1.svg.meta
Normal file
@ -0,0 +1,12 @@
|
||||
{
|
||||
"ver": "1.0.0",
|
||||
"importer": "*",
|
||||
"imported": true,
|
||||
"uuid": "0843c51e-d1a6-41b2-8717-d98f3f4aee32",
|
||||
"files": [
|
||||
".json",
|
||||
".svg"
|
||||
],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
||||
40
assets/Images/logo2vnuzu_Image.svg
Normal file
|
After Width: | Height: | Size: 1.3 MiB |
12
assets/Images/logo2vnuzu_Image.svg.meta
Normal file
@ -0,0 +1,12 @@
|
||||
{
|
||||
"ver": "1.0.0",
|
||||
"importer": "*",
|
||||
"imported": true,
|
||||
"uuid": "0fa71a32-7f05-4817-893e-4e374fe5fe1d",
|
||||
"files": [
|
||||
".json",
|
||||
".svg"
|
||||
],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
||||
25
assets/Images/logo2vnuzu_image1.svg
Normal file
|
After Width: | Height: | Size: 1.3 MiB |
12
assets/Images/logo2vnuzu_image1.svg.meta
Normal file
@ -0,0 +1,12 @@
|
||||
{
|
||||
"ver": "1.0.0",
|
||||
"importer": "*",
|
||||
"imported": true,
|
||||
"uuid": "09142621-bbac-4d63-b4e7-e349dd9bc90a",
|
||||
"files": [
|
||||
".json",
|
||||
".svg"
|
||||
],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
||||
33
assets/Images/logo2vnuzu_text1.svg
Normal file
@ -0,0 +1,33 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
version="1.1"
|
||||
id="svg1"
|
||||
width="851.72156"
|
||||
height="97.743721"
|
||||
viewBox="0 0 851.72158 97.743723"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg">
|
||||
<defs
|
||||
id="defs1">
|
||||
<rect
|
||||
x="348.91919"
|
||||
y="985.12054"
|
||||
width="900.3869"
|
||||
height="121.36035"
|
||||
id="rect2" />
|
||||
</defs>
|
||||
<g
|
||||
id="g1"
|
||||
transform="translate(-271.49887,-1033.3751)">
|
||||
<text
|
||||
xml:space="preserve"
|
||||
id="text1"
|
||||
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:96px;font-family:Ubuntu;-inkscape-font-specification:'Ubuntu, Bold';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:start;writing-mode:lr-tb;direction:ltr;white-space:pre;shape-inside:url(#rect2);fill:#000000"
|
||||
transform="matrix(1.0618908,0,0,1.1388856,-107.17131,-113.00025)"><tspan
|
||||
x="348.91992"
|
||||
y="1074.6403"
|
||||
id="tspan1">ПОДГРУЖАЕМ ...</tspan></text>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.2 KiB |
12
assets/Images/logo2vnuzu_text1.svg.meta
Normal file
@ -0,0 +1,12 @@
|
||||
{
|
||||
"ver": "1.0.0",
|
||||
"importer": "*",
|
||||
"imported": true,
|
||||
"uuid": "2f901b2b-02f4-48d2-ac85-0426fbbb432c",
|
||||
"files": [
|
||||
".json",
|
||||
".svg"
|
||||
],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
||||
BIN
assets/Images/logoinit.png
Normal file
|
After Width: | Height: | Size: 297 KiB |
42
assets/Images/logoinit.png.meta
Normal file
@ -0,0 +1,42 @@
|
||||
{
|
||||
"ver": "1.0.27",
|
||||
"importer": "image",
|
||||
"imported": true,
|
||||
"uuid": "31b28a96-9cb3-4e45-ac4a-975d8a0f36f9",
|
||||
"files": [
|
||||
".json",
|
||||
".png"
|
||||
],
|
||||
"subMetas": {
|
||||
"6c48a": {
|
||||
"importer": "texture",
|
||||
"uuid": "31b28a96-9cb3-4e45-ac4a-975d8a0f36f9@6c48a",
|
||||
"displayName": "logoinit",
|
||||
"id": "6c48a",
|
||||
"name": "texture",
|
||||
"userData": {
|
||||
"wrapModeS": "repeat",
|
||||
"wrapModeT": "repeat",
|
||||
"minfilter": "linear",
|
||||
"magfilter": "linear",
|
||||
"mipfilter": "none",
|
||||
"anisotropy": 0,
|
||||
"isUuid": true,
|
||||
"imageUuidOrDatabaseUri": "31b28a96-9cb3-4e45-ac4a-975d8a0f36f9",
|
||||
"visible": false
|
||||
},
|
||||
"ver": "1.0.22",
|
||||
"imported": true,
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {}
|
||||
}
|
||||
},
|
||||
"userData": {
|
||||
"hasAlpha": true,
|
||||
"type": "texture",
|
||||
"fixAlphaTransparencyArtifacts": false,
|
||||
"redirect": "31b28a96-9cb3-4e45-ac4a-975d8a0f36f9@6c48a"
|
||||
}
|
||||
}
|
||||
34
assets/Images/logoinit.svg
Normal file
|
After Width: | Height: | Size: 1.3 MiB |
12
assets/Images/logoinit.svg.meta
Normal file
@ -0,0 +1,12 @@
|
||||
{
|
||||
"ver": "1.0.0",
|
||||
"importer": "*",
|
||||
"imported": true,
|
||||
"uuid": "56820e31-6cad-4f54-a27a-f27be881cf5f",
|
||||
"files": [
|
||||
".json",
|
||||
".svg"
|
||||
],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
||||
BIN
assets/Images/white_triangle.png
Normal file
|
After Width: | Height: | Size: 195 B |
134
assets/Images/white_triangle.png.meta
Normal file
@ -0,0 +1,134 @@
|
||||
{
|
||||
"ver": "1.0.27",
|
||||
"importer": "image",
|
||||
"imported": true,
|
||||
"uuid": "b16f532e-a707-4a06-bb9c-477600efc222",
|
||||
"files": [
|
||||
".json",
|
||||
".png"
|
||||
],
|
||||
"subMetas": {
|
||||
"6c48a": {
|
||||
"importer": "texture",
|
||||
"uuid": "b16f532e-a707-4a06-bb9c-477600efc222@6c48a",
|
||||
"displayName": "white_triangle",
|
||||
"id": "6c48a",
|
||||
"name": "texture",
|
||||
"userData": {
|
||||
"wrapModeS": "clamp-to-edge",
|
||||
"wrapModeT": "clamp-to-edge",
|
||||
"minfilter": "linear",
|
||||
"magfilter": "linear",
|
||||
"mipfilter": "none",
|
||||
"anisotropy": 0,
|
||||
"isUuid": true,
|
||||
"imageUuidOrDatabaseUri": "b16f532e-a707-4a06-bb9c-477600efc222",
|
||||
"visible": false
|
||||
},
|
||||
"ver": "1.0.22",
|
||||
"imported": true,
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {}
|
||||
},
|
||||
"f9941": {
|
||||
"importer": "sprite-frame",
|
||||
"uuid": "b16f532e-a707-4a06-bb9c-477600efc222@f9941",
|
||||
"displayName": "white_triangle",
|
||||
"id": "f9941",
|
||||
"name": "spriteFrame",
|
||||
"userData": {
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 0,
|
||||
"trimY": 0,
|
||||
"width": 48,
|
||||
"height": 48,
|
||||
"rawWidth": 48,
|
||||
"rawHeight": 48,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"packable": true,
|
||||
"pixelsToUnit": 100,
|
||||
"pivotX": 0.5,
|
||||
"pivotY": 0.5,
|
||||
"meshType": 0,
|
||||
"vertices": {
|
||||
"rawPosition": [
|
||||
-24,
|
||||
-24,
|
||||
0,
|
||||
24,
|
||||
-24,
|
||||
0,
|
||||
-24,
|
||||
24,
|
||||
0,
|
||||
24,
|
||||
24,
|
||||
0
|
||||
],
|
||||
"indexes": [
|
||||
0,
|
||||
1,
|
||||
2,
|
||||
2,
|
||||
1,
|
||||
3
|
||||
],
|
||||
"uv": [
|
||||
0,
|
||||
48,
|
||||
48,
|
||||
48,
|
||||
0,
|
||||
0,
|
||||
48,
|
||||
0
|
||||
],
|
||||
"nuv": [
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
1,
|
||||
1
|
||||
],
|
||||
"minPos": [
|
||||
-24,
|
||||
-24,
|
||||
0
|
||||
],
|
||||
"maxPos": [
|
||||
24,
|
||||
24,
|
||||
0
|
||||
]
|
||||
},
|
||||
"isUuid": true,
|
||||
"imageUuidOrDatabaseUri": "b16f532e-a707-4a06-bb9c-477600efc222@6c48a",
|
||||
"atlasUuid": ""
|
||||
},
|
||||
"ver": "1.0.12",
|
||||
"imported": true,
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {}
|
||||
}
|
||||
},
|
||||
"userData": {
|
||||
"hasAlpha": true,
|
||||
"type": "sprite-frame",
|
||||
"fixAlphaTransparencyArtifacts": false,
|
||||
"redirect": "b16f532e-a707-4a06-bb9c-477600efc222@6c48a"
|
||||
}
|
||||
}
|
||||
@ -170,13 +170,13 @@
|
||||
"_dstBlendFactor": 4,
|
||||
"_color": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 214,
|
||||
"g": 214,
|
||||
"b": 214,
|
||||
"a": 0
|
||||
"r": 255,
|
||||
"g": 255,
|
||||
"b": 255,
|
||||
"a": 255
|
||||
},
|
||||
"_spriteFrame": {
|
||||
"__uuid__": "20835ba4-6145-4fbc-a58a-051ce700aa3e@f9941",
|
||||
"__uuid__": "b16f532e-a707-4a06-bb9c-477600efc222@f9941",
|
||||
"__expectedType__": "cc.SpriteFrame"
|
||||
},
|
||||
"_type": 1,
|
||||
@ -212,13 +212,13 @@
|
||||
},
|
||||
"clickEvents": [],
|
||||
"_interactable": true,
|
||||
"_transition": 1,
|
||||
"_transition": 2,
|
||||
"_normalColor": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 214,
|
||||
"g": 214,
|
||||
"b": 214,
|
||||
"a": 0
|
||||
"a": 255
|
||||
},
|
||||
"_hoverColor": {
|
||||
"__type__": "cc.Color",
|
||||
@ -242,11 +242,11 @@
|
||||
"a": 255
|
||||
},
|
||||
"_normalSprite": {
|
||||
"__uuid__": "20835ba4-6145-4fbc-a58a-051ce700aa3e@f9941",
|
||||
"__uuid__": "b16f532e-a707-4a06-bb9c-477600efc222@f9941",
|
||||
"__expectedType__": "cc.SpriteFrame"
|
||||
},
|
||||
"_hoverSprite": {
|
||||
"__uuid__": "951249e0-9f16-456d-8b85-a6ca954da16b@f9941",
|
||||
"__uuid__": "987794f8-c597-4400-9d3b-2849b7110099@f9941",
|
||||
"__expectedType__": "cc.SpriteFrame"
|
||||
},
|
||||
"_pressedSprite": {
|
||||
|
||||
@ -22,13 +22,10 @@
|
||||
"__id__": 2
|
||||
},
|
||||
{
|
||||
"__id__": 10
|
||||
"__id__": 12
|
||||
},
|
||||
{
|
||||
"__id__": 16
|
||||
},
|
||||
{
|
||||
"__id__": 22
|
||||
"__id__": 28
|
||||
}
|
||||
],
|
||||
"_active": true,
|
||||
@ -77,7 +74,7 @@
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "ItemButton",
|
||||
"_name": "Button",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_parent": {
|
||||
@ -94,10 +91,13 @@
|
||||
},
|
||||
{
|
||||
"__id__": 7
|
||||
},
|
||||
{
|
||||
"__id__": 9
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 9
|
||||
"__id__": 11
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
@ -142,8 +142,8 @@
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 215,
|
||||
"height": 40
|
||||
"width": 200,
|
||||
"height": 30
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
@ -173,16 +173,16 @@
|
||||
"_dstBlendFactor": 4,
|
||||
"_color": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 214,
|
||||
"g": 214,
|
||||
"b": 214,
|
||||
"a": 0
|
||||
"r": 255,
|
||||
"g": 255,
|
||||
"b": 255,
|
||||
"a": 255
|
||||
},
|
||||
"_spriteFrame": {
|
||||
"__uuid__": "20835ba4-6145-4fbc-a58a-051ce700aa3e@f9941",
|
||||
"__uuid__": "b16f532e-a707-4a06-bb9c-477600efc222@f9941",
|
||||
"__expectedType__": "cc.SpriteFrame"
|
||||
},
|
||||
"_type": 1,
|
||||
"_type": 2,
|
||||
"_fillType": 0,
|
||||
"_sizeMode": 0,
|
||||
"_fillCenter": {
|
||||
@ -192,7 +192,7 @@
|
||||
},
|
||||
"_fillStart": 0,
|
||||
"_fillRange": 0,
|
||||
"_isTrimmedMode": true,
|
||||
"_isTrimmedMode": false,
|
||||
"_useGrayscale": false,
|
||||
"_atlas": null,
|
||||
"_id": ""
|
||||
@ -215,13 +215,13 @@
|
||||
},
|
||||
"clickEvents": [],
|
||||
"_interactable": true,
|
||||
"_transition": 1,
|
||||
"_transition": 2,
|
||||
"_normalColor": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 214,
|
||||
"g": 214,
|
||||
"b": 214,
|
||||
"a": 0
|
||||
"r": 255,
|
||||
"g": 255,
|
||||
"b": 255,
|
||||
"a": 255
|
||||
},
|
||||
"_hoverColor": {
|
||||
"__type__": "cc.Color",
|
||||
@ -245,15 +245,15 @@
|
||||
"a": 255
|
||||
},
|
||||
"_normalSprite": {
|
||||
"__uuid__": "20835ba4-6145-4fbc-a58a-051ce700aa3e@f9941",
|
||||
"__uuid__": "b16f532e-a707-4a06-bb9c-477600efc222@f9941",
|
||||
"__expectedType__": "cc.SpriteFrame"
|
||||
},
|
||||
"_hoverSprite": {
|
||||
"__uuid__": "951249e0-9f16-456d-8b85-a6ca954da16b@f9941",
|
||||
"__uuid__": "987794f8-c597-4400-9d3b-2849b7110099@f9941",
|
||||
"__expectedType__": "cc.SpriteFrame"
|
||||
},
|
||||
"_pressedSprite": {
|
||||
"__uuid__": "544e49d6-3f05-4fa8-9a9e-091f98fc2ce8@f9941",
|
||||
"__uuid__": "951249e0-9f16-456d-8b85-a6ca954da16b@f9941",
|
||||
"__expectedType__": "cc.SpriteFrame"
|
||||
},
|
||||
"_disabledSprite": {
|
||||
@ -271,6 +271,42 @@
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "0181n7qDZMGLC8oGGI2DWt"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Widget",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 2
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 10
|
||||
},
|
||||
"_alignFlags": 40,
|
||||
"_target": null,
|
||||
"_left": 0,
|
||||
"_right": 0,
|
||||
"_top": 0,
|
||||
"_bottom": 0,
|
||||
"_horizontalCenter": 0,
|
||||
"_verticalCenter": 0,
|
||||
"_isAbsLeft": true,
|
||||
"_isAbsRight": true,
|
||||
"_isAbsTop": true,
|
||||
"_isAbsBottom": true,
|
||||
"_isAbsHorizontalCenter": true,
|
||||
"_isAbsVerticalCenter": true,
|
||||
"_originalWidth": 215,
|
||||
"_originalHeight": 0,
|
||||
"_alignMode": 2,
|
||||
"_lockFlags": 0,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "f3ob2V4wFNj7HSLwU/r4rm"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
@ -284,330 +320,6 @@
|
||||
"targetOverrides": null,
|
||||
"nestedPrefabInstanceRoots": null
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "Label",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_parent": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 11
|
||||
},
|
||||
{
|
||||
"__id__": 13
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 15
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": -14.094,
|
||||
"y": 1.072,
|
||||
"z": 0
|
||||
},
|
||||
"_lrot": {
|
||||
"__type__": "cc.Quat",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0,
|
||||
"w": 1
|
||||
},
|
||||
"_lscale": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 1,
|
||||
"y": 1,
|
||||
"z": 1
|
||||
},
|
||||
"_mobility": 0,
|
||||
"_layer": 33554432,
|
||||
"_euler": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.UITransform",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 10
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 12
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 175,
|
||||
"height": 35
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5,
|
||||
"y": 0.5
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "65+KzBR3dPbr711K9CQ39S"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Label",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 10
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 14
|
||||
},
|
||||
"_customMaterial": null,
|
||||
"_srcBlendFactor": 2,
|
||||
"_dstBlendFactor": 4,
|
||||
"_color": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 0,
|
||||
"g": 0,
|
||||
"b": 0,
|
||||
"a": 255
|
||||
},
|
||||
"_string": "button",
|
||||
"_horizontalAlign": 1,
|
||||
"_verticalAlign": 1,
|
||||
"_actualFontSize": 14,
|
||||
"_fontSize": 14,
|
||||
"_fontFamily": "Arial",
|
||||
"_lineHeight": 17,
|
||||
"_overflow": 1,
|
||||
"_enableWrapText": true,
|
||||
"_font": {
|
||||
"__uuid__": "ed546a4a-5231-4dfb-9c13-c1d6022cd74e",
|
||||
"__expectedType__": "cc.TTFFont"
|
||||
},
|
||||
"_isSystemFontUsed": false,
|
||||
"_spacingX": 0,
|
||||
"_isItalic": false,
|
||||
"_isBold": false,
|
||||
"_isUnderline": false,
|
||||
"_underlineHeight": 2,
|
||||
"_cacheMode": 2,
|
||||
"_enableOutline": false,
|
||||
"_outlineColor": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 0,
|
||||
"g": 0,
|
||||
"b": 0,
|
||||
"a": 255
|
||||
},
|
||||
"_outlineWidth": 2,
|
||||
"_enableShadow": false,
|
||||
"_shadowColor": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 0,
|
||||
"g": 0,
|
||||
"b": 0,
|
||||
"a": 255
|
||||
},
|
||||
"_shadowOffset": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 2,
|
||||
"y": 2
|
||||
},
|
||||
"_shadowBlur": 2,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "dfMeiwh0hAYYKBonsUe56x"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 1
|
||||
},
|
||||
"asset": {
|
||||
"__id__": 0
|
||||
},
|
||||
"fileId": "721GJYNz1E/7th3pz4p0FM",
|
||||
"instance": null,
|
||||
"targetOverrides": null,
|
||||
"nestedPrefabInstanceRoots": null
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "Label-001",
|
||||
"_objFlags": 512,
|
||||
"__editorExtras__": {},
|
||||
"_parent": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 17
|
||||
},
|
||||
{
|
||||
"__id__": 19
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 21
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": -14.094,
|
||||
"y": -12.121,
|
||||
"z": 0
|
||||
},
|
||||
"_lrot": {
|
||||
"__type__": "cc.Quat",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0,
|
||||
"w": 1
|
||||
},
|
||||
"_lscale": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 1,
|
||||
"y": 1,
|
||||
"z": 1
|
||||
},
|
||||
"_mobility": 0,
|
||||
"_layer": 33554432,
|
||||
"_euler": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.UITransform",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 16
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 18
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 175,
|
||||
"height": 15
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5,
|
||||
"y": 0.5
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "1e7o7412dCV5hX3YLwQeyc"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Label",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 16
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 20
|
||||
},
|
||||
"_customMaterial": null,
|
||||
"_srcBlendFactor": 2,
|
||||
"_dstBlendFactor": 4,
|
||||
"_color": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 0,
|
||||
"g": 0,
|
||||
"b": 0,
|
||||
"a": 0
|
||||
},
|
||||
"_string": "button",
|
||||
"_horizontalAlign": 0,
|
||||
"_verticalAlign": 0,
|
||||
"_actualFontSize": 12,
|
||||
"_fontSize": 12,
|
||||
"_fontFamily": "Arial",
|
||||
"_lineHeight": 20,
|
||||
"_overflow": 1,
|
||||
"_enableWrapText": false,
|
||||
"_font": {
|
||||
"__uuid__": "ed546a4a-5231-4dfb-9c13-c1d6022cd74e",
|
||||
"__expectedType__": "cc.TTFFont"
|
||||
},
|
||||
"_isSystemFontUsed": false,
|
||||
"_spacingX": 0,
|
||||
"_isItalic": false,
|
||||
"_isBold": false,
|
||||
"_isUnderline": false,
|
||||
"_underlineHeight": 2,
|
||||
"_cacheMode": 2,
|
||||
"_enableOutline": false,
|
||||
"_outlineColor": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 0,
|
||||
"g": 0,
|
||||
"b": 0,
|
||||
"a": 255
|
||||
},
|
||||
"_outlineWidth": 2,
|
||||
"_enableShadow": false,
|
||||
"_shadowColor": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 0,
|
||||
"g": 0,
|
||||
"b": 0,
|
||||
"a": 255
|
||||
},
|
||||
"_shadowOffset": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 2,
|
||||
"y": 2
|
||||
},
|
||||
"_shadowBlur": 2,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "61G54mSwBEC76bZuWlZobr"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 1
|
||||
},
|
||||
"asset": {
|
||||
"__id__": 0
|
||||
},
|
||||
"fileId": "8fAdewM09EmJgQtmW9WIWv",
|
||||
"instance": null,
|
||||
"targetOverrides": null,
|
||||
"nestedPrefabInstanceRoots": null
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "ErrorNumberButton",
|
||||
@ -618,27 +330,30 @@
|
||||
},
|
||||
"_children": [
|
||||
{
|
||||
"__id__": 23
|
||||
"__id__": 13
|
||||
}
|
||||
],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 29
|
||||
"__id__": 19
|
||||
},
|
||||
{
|
||||
"__id__": 31
|
||||
"__id__": 21
|
||||
},
|
||||
{
|
||||
"__id__": 33
|
||||
"__id__": 23
|
||||
},
|
||||
{
|
||||
"__id__": 25
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 35
|
||||
"__id__": 27
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 90.066,
|
||||
"x": 85,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
@ -671,20 +386,20 @@
|
||||
"_objFlags": 512,
|
||||
"__editorExtras__": {},
|
||||
"_parent": {
|
||||
"__id__": 22
|
||||
"__id__": 12
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 24
|
||||
"__id__": 14
|
||||
},
|
||||
{
|
||||
"__id__": 26
|
||||
"__id__": 16
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 28
|
||||
"__id__": 18
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
@ -721,11 +436,11 @@
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 23
|
||||
"__id__": 13
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 25
|
||||
"__id__": 15
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
@ -749,11 +464,11 @@
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 23
|
||||
"__id__": 13
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 27
|
||||
"__id__": 17
|
||||
},
|
||||
"_customMaterial": null,
|
||||
"_srcBlendFactor": 2,
|
||||
@ -768,8 +483,8 @@
|
||||
"_string": "34",
|
||||
"_horizontalAlign": 1,
|
||||
"_verticalAlign": 1,
|
||||
"_actualFontSize": 12,
|
||||
"_fontSize": 12,
|
||||
"_actualFontSize": 14,
|
||||
"_fontSize": 14,
|
||||
"_fontFamily": "Arial",
|
||||
"_lineHeight": 20,
|
||||
"_overflow": 1,
|
||||
@ -785,7 +500,7 @@
|
||||
"_isUnderline": false,
|
||||
"_underlineHeight": 2,
|
||||
"_cacheMode": 2,
|
||||
"_enableOutline": true,
|
||||
"_enableOutline": false,
|
||||
"_outlineColor": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 0,
|
||||
@ -833,11 +548,11 @@
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 22
|
||||
"__id__": 12
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 30
|
||||
"__id__": 20
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
@ -861,11 +576,11 @@
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 22
|
||||
"__id__": 12
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 32
|
||||
"__id__": 22
|
||||
},
|
||||
"_customMaterial": null,
|
||||
"_srcBlendFactor": 2,
|
||||
@ -878,10 +593,10 @@
|
||||
"a": 255
|
||||
},
|
||||
"_spriteFrame": {
|
||||
"__uuid__": "20835ba4-6145-4fbc-a58a-051ce700aa3e@f9941",
|
||||
"__uuid__": "f12a23c4-b924-4322-a260-3d982428f1e8@f9941",
|
||||
"__expectedType__": "cc.SpriteFrame"
|
||||
},
|
||||
"_type": 1,
|
||||
"_type": 0,
|
||||
"_fillType": 0,
|
||||
"_sizeMode": 0,
|
||||
"_fillCenter": {
|
||||
@ -891,7 +606,7 @@
|
||||
},
|
||||
"_fillStart": 0,
|
||||
"_fillRange": 0,
|
||||
"_isTrimmedMode": true,
|
||||
"_isTrimmedMode": false,
|
||||
"_useGrayscale": false,
|
||||
"_atlas": null,
|
||||
"_id": ""
|
||||
@ -906,11 +621,11 @@
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 22
|
||||
"__id__": 12
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 34
|
||||
"__id__": 24
|
||||
},
|
||||
"clickEvents": [],
|
||||
"_interactable": true,
|
||||
@ -943,26 +658,14 @@
|
||||
"b": 124,
|
||||
"a": 0
|
||||
},
|
||||
"_normalSprite": {
|
||||
"__uuid__": "20835ba4-6145-4fbc-a58a-051ce700aa3e@f9941",
|
||||
"__expectedType__": "cc.SpriteFrame"
|
||||
},
|
||||
"_hoverSprite": {
|
||||
"__uuid__": "20835ba4-6145-4fbc-a58a-051ce700aa3e@f9941",
|
||||
"__expectedType__": "cc.SpriteFrame"
|
||||
},
|
||||
"_pressedSprite": {
|
||||
"__uuid__": "544e49d6-3f05-4fa8-9a9e-091f98fc2ce8@f9941",
|
||||
"__expectedType__": "cc.SpriteFrame"
|
||||
},
|
||||
"_disabledSprite": {
|
||||
"__uuid__": "951249e0-9f16-456d-8b85-a6ca954da16b@f9941",
|
||||
"__expectedType__": "cc.SpriteFrame"
|
||||
},
|
||||
"_normalSprite": null,
|
||||
"_hoverSprite": null,
|
||||
"_pressedSprite": null,
|
||||
"_disabledSprite": null,
|
||||
"_duration": 0.1,
|
||||
"_zoomScale": 1.2,
|
||||
"_target": {
|
||||
"__id__": 22
|
||||
"__id__": 12
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
@ -970,6 +673,42 @@
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "03K6h9Q1BLyaxrENE0yHYL"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Widget",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 12
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 26
|
||||
},
|
||||
"_alignFlags": 34,
|
||||
"_target": null,
|
||||
"_left": 85,
|
||||
"_right": 0,
|
||||
"_top": 0,
|
||||
"_bottom": 0,
|
||||
"_horizontalCenter": 0,
|
||||
"_verticalCenter": 0,
|
||||
"_isAbsLeft": true,
|
||||
"_isAbsRight": true,
|
||||
"_isAbsTop": true,
|
||||
"_isAbsBottom": true,
|
||||
"_isAbsHorizontalCenter": true,
|
||||
"_isAbsVerticalCenter": true,
|
||||
"_originalWidth": 30,
|
||||
"_originalHeight": 0,
|
||||
"_alignMode": 2,
|
||||
"_lockFlags": 32,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "7aKjlXGSdLzJe6T9Vma4TX"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
@ -983,6 +722,207 @@
|
||||
"targetOverrides": null,
|
||||
"nestedPrefabInstanceRoots": null
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "Label",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_parent": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 29
|
||||
},
|
||||
{
|
||||
"__id__": 31
|
||||
},
|
||||
{
|
||||
"__id__": 33
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 35
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": -15,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"_lrot": {
|
||||
"__type__": "cc.Quat",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0,
|
||||
"w": 1
|
||||
},
|
||||
"_lscale": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 1,
|
||||
"y": 1,
|
||||
"z": 1
|
||||
},
|
||||
"_mobility": 0,
|
||||
"_layer": 33554432,
|
||||
"_euler": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.UITransform",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 28
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 30
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 170,
|
||||
"height": 30
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5,
|
||||
"y": 0.5
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "65+KzBR3dPbr711K9CQ39S"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Label",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 28
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 32
|
||||
},
|
||||
"_customMaterial": null,
|
||||
"_srcBlendFactor": 2,
|
||||
"_dstBlendFactor": 4,
|
||||
"_color": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 0,
|
||||
"g": 0,
|
||||
"b": 0,
|
||||
"a": 255
|
||||
},
|
||||
"_string": "button",
|
||||
"_horizontalAlign": 0,
|
||||
"_verticalAlign": 1,
|
||||
"_actualFontSize": 10,
|
||||
"_fontSize": 10,
|
||||
"_fontFamily": "Arial",
|
||||
"_lineHeight": 14,
|
||||
"_overflow": 1,
|
||||
"_enableWrapText": true,
|
||||
"_font": {
|
||||
"__uuid__": "ed546a4a-5231-4dfb-9c13-c1d6022cd74e",
|
||||
"__expectedType__": "cc.TTFFont"
|
||||
},
|
||||
"_isSystemFontUsed": false,
|
||||
"_spacingX": 0,
|
||||
"_isItalic": false,
|
||||
"_isBold": false,
|
||||
"_isUnderline": false,
|
||||
"_underlineHeight": 2,
|
||||
"_cacheMode": 2,
|
||||
"_enableOutline": false,
|
||||
"_outlineColor": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 0,
|
||||
"g": 0,
|
||||
"b": 0,
|
||||
"a": 255
|
||||
},
|
||||
"_outlineWidth": 2,
|
||||
"_enableShadow": false,
|
||||
"_shadowColor": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 0,
|
||||
"g": 0,
|
||||
"b": 0,
|
||||
"a": 255
|
||||
},
|
||||
"_shadowOffset": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 2,
|
||||
"y": 2
|
||||
},
|
||||
"_shadowBlur": 2,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "dfMeiwh0hAYYKBonsUe56x"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Widget",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 28
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 34
|
||||
},
|
||||
"_alignFlags": 13,
|
||||
"_target": null,
|
||||
"_left": 0,
|
||||
"_right": 0,
|
||||
"_top": 0,
|
||||
"_bottom": 0,
|
||||
"_horizontalCenter": 0,
|
||||
"_verticalCenter": 0,
|
||||
"_isAbsLeft": true,
|
||||
"_isAbsRight": true,
|
||||
"_isAbsTop": true,
|
||||
"_isAbsBottom": true,
|
||||
"_isAbsHorizontalCenter": true,
|
||||
"_isAbsVerticalCenter": true,
|
||||
"_originalWidth": 0,
|
||||
"_originalHeight": 30,
|
||||
"_alignMode": 2,
|
||||
"_lockFlags": 13,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "4elb5+mk1Mxr9wKs2KR5x+"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 1
|
||||
},
|
||||
"asset": {
|
||||
"__id__": 0
|
||||
},
|
||||
"fileId": "721GJYNz1E/7th3pz4p0FM",
|
||||
"instance": null,
|
||||
"targetOverrides": null,
|
||||
"nestedPrefabInstanceRoots": null
|
||||
},
|
||||
{
|
||||
"__type__": "cc.UITransform",
|
||||
"_name": "",
|
||||
@ -997,8 +937,8 @@
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 215,
|
||||
"height": 36
|
||||
"width": 200,
|
||||
"height": 30
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
@ -1066,16 +1006,16 @@
|
||||
"__id__": 41
|
||||
},
|
||||
"nameLabel": {
|
||||
"__id__": 13
|
||||
"__id__": 31
|
||||
},
|
||||
"button": {
|
||||
"__id__": 7
|
||||
},
|
||||
"ErrorButton": {
|
||||
"__id__": 33
|
||||
"__id__": 23
|
||||
},
|
||||
"ErrorNumber": {
|
||||
"__id__": 26
|
||||
"__id__": 16
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
|
||||
@ -35,13 +35,10 @@
|
||||
},
|
||||
{
|
||||
"__id__": 24
|
||||
},
|
||||
{
|
||||
"__id__": 26
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 28
|
||||
"__id__": 26
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
@ -170,13 +167,13 @@
|
||||
"_dstBlendFactor": 4,
|
||||
"_color": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 214,
|
||||
"g": 214,
|
||||
"b": 214,
|
||||
"a": 0
|
||||
"r": 255,
|
||||
"g": 255,
|
||||
"b": 255,
|
||||
"a": 255
|
||||
},
|
||||
"_spriteFrame": {
|
||||
"__uuid__": "20835ba4-6145-4fbc-a58a-051ce700aa3e@f9941",
|
||||
"__uuid__": "b16f532e-a707-4a06-bb9c-477600efc222@f9941",
|
||||
"__expectedType__": "cc.SpriteFrame"
|
||||
},
|
||||
"_type": 1,
|
||||
@ -212,7 +209,7 @@
|
||||
},
|
||||
"clickEvents": [],
|
||||
"_interactable": true,
|
||||
"_transition": 1,
|
||||
"_transition": 2,
|
||||
"_normalColor": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 214,
|
||||
@ -242,11 +239,11 @@
|
||||
"a": 255
|
||||
},
|
||||
"_normalSprite": {
|
||||
"__uuid__": "20835ba4-6145-4fbc-a58a-051ce700aa3e@f9941",
|
||||
"__uuid__": "b16f532e-a707-4a06-bb9c-477600efc222@f9941",
|
||||
"__expectedType__": "cc.SpriteFrame"
|
||||
},
|
||||
"_hoverSprite": {
|
||||
"__uuid__": "951249e0-9f16-456d-8b85-a6ca954da16b@f9941",
|
||||
"__uuid__": "987794f8-c597-4400-9d3b-2849b7110099@f9941",
|
||||
"__expectedType__": "cc.SpriteFrame"
|
||||
},
|
||||
"_pressedSprite": {
|
||||
@ -620,7 +617,7 @@
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 230,
|
||||
"height": 36
|
||||
"height": 45
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
@ -633,48 +630,6 @@
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "29o4eyV5ZNy4dV0MMtsx28"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Sprite",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 25
|
||||
},
|
||||
"_customMaterial": null,
|
||||
"_srcBlendFactor": 2,
|
||||
"_dstBlendFactor": 4,
|
||||
"_color": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 255,
|
||||
"g": 255,
|
||||
"b": 255,
|
||||
"a": 255
|
||||
},
|
||||
"_spriteFrame": null,
|
||||
"_type": 0,
|
||||
"_fillType": 0,
|
||||
"_sizeMode": 1,
|
||||
"_fillCenter": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"_fillStart": 0,
|
||||
"_fillRange": 0,
|
||||
"_isTrimmedMode": true,
|
||||
"_useGrayscale": false,
|
||||
"_atlas": null,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "90NAT7FghLQ6RsYo8dZKX5"
|
||||
},
|
||||
{
|
||||
"__type__": "8d856ddUi1G2ad/KZe4aDTc",
|
||||
"_name": "",
|
||||
@ -685,7 +640,7 @@
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 27
|
||||
"__id__": 25
|
||||
},
|
||||
"nameLabel": {
|
||||
"__id__": 13
|
||||
|
||||
@ -24,6 +24,9 @@
|
||||
},
|
||||
{
|
||||
"__id__": 7
|
||||
},
|
||||
{
|
||||
"__id__": 10
|
||||
}
|
||||
],
|
||||
"_active": true,
|
||||
@ -58,7 +61,7 @@
|
||||
},
|
||||
"autoReleaseAssets": false,
|
||||
"_globals": {
|
||||
"__id__": 10
|
||||
"__id__": 26
|
||||
},
|
||||
"_id": "658bce01-ef82-4cee-8fd2-af66cebdba02"
|
||||
},
|
||||
@ -350,30 +353,628 @@
|
||||
"_bakeToReflectionProbe": true
|
||||
},
|
||||
{
|
||||
"__type__": "cc.SceneGlobals",
|
||||
"ambient": {
|
||||
"__type__": "cc.Node",
|
||||
"_name": "Canvas",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_parent": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_children": [
|
||||
{
|
||||
"__id__": 11
|
||||
},
|
||||
{
|
||||
"__id__": 13
|
||||
}
|
||||
],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 23
|
||||
},
|
||||
{
|
||||
"__id__": 24
|
||||
},
|
||||
{
|
||||
"__id__": 25
|
||||
}
|
||||
],
|
||||
"_prefab": null,
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 640,
|
||||
"y": 360,
|
||||
"z": 0
|
||||
},
|
||||
"_lrot": {
|
||||
"__type__": "cc.Quat",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0,
|
||||
"w": 1
|
||||
},
|
||||
"_lscale": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 1,
|
||||
"y": 1,
|
||||
"z": 1
|
||||
},
|
||||
"_mobility": 0,
|
||||
"_layer": 33554432,
|
||||
"_euler": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"_id": "e3ju1q0VlDeZ8iHIwAKyQZ"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "Camera",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_parent": {
|
||||
"__id__": 10
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 12
|
||||
}
|
||||
],
|
||||
"_prefab": null,
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 1000
|
||||
},
|
||||
"_lrot": {
|
||||
"__type__": "cc.Quat",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0,
|
||||
"w": 1
|
||||
},
|
||||
"_lscale": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 1,
|
||||
"y": 1,
|
||||
"z": 1
|
||||
},
|
||||
"_mobility": 0,
|
||||
"_layer": 1073741824,
|
||||
"_euler": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"_id": "65rHvUwytC4ajYZFIVkhl8"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Camera",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 11
|
||||
},
|
||||
"shadows": {
|
||||
"__id__": 12
|
||||
"_enabled": true,
|
||||
"__prefab": null,
|
||||
"_projection": 0,
|
||||
"_priority": 1073741824,
|
||||
"_fov": 45,
|
||||
"_fovAxis": 0,
|
||||
"_orthoHeight": 360,
|
||||
"_near": 1,
|
||||
"_far": 2000,
|
||||
"_color": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 0,
|
||||
"g": 0,
|
||||
"b": 0,
|
||||
"a": 255
|
||||
},
|
||||
"_skybox": {
|
||||
"_depth": 1,
|
||||
"_stencil": 0,
|
||||
"_clearFlags": 6,
|
||||
"_rect": {
|
||||
"__type__": "cc.Rect",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"width": 1,
|
||||
"height": 1
|
||||
},
|
||||
"_aperture": 19,
|
||||
"_shutter": 7,
|
||||
"_iso": 0,
|
||||
"_screenScale": 1,
|
||||
"_visibility": 41943040,
|
||||
"_targetTexture": null,
|
||||
"_postProcess": null,
|
||||
"_usePostProcess": false,
|
||||
"_cameraType": -1,
|
||||
"_trackingType": 0,
|
||||
"_id": "81LKHmU+ZIA6YN2LFfugXi"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "BackButton",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_parent": {
|
||||
"__id__": 10
|
||||
},
|
||||
"_children": [
|
||||
{
|
||||
"__id__": 14
|
||||
}
|
||||
],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 17
|
||||
},
|
||||
{
|
||||
"__id__": 18
|
||||
},
|
||||
{
|
||||
"__id__": 19
|
||||
},
|
||||
{
|
||||
"__id__": 21
|
||||
},
|
||||
{
|
||||
"__id__": 22
|
||||
}
|
||||
],
|
||||
"_prefab": null,
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": -585,
|
||||
"y": 335,
|
||||
"z": 0
|
||||
},
|
||||
"_lrot": {
|
||||
"__type__": "cc.Quat",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0,
|
||||
"w": 1
|
||||
},
|
||||
"_lscale": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 1,
|
||||
"y": 1,
|
||||
"z": 1
|
||||
},
|
||||
"_mobility": 0,
|
||||
"_layer": 33554432,
|
||||
"_euler": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"_id": "e037NNW2RG3LhGiVWi6QW5"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "Label",
|
||||
"_objFlags": 512,
|
||||
"__editorExtras__": {},
|
||||
"_parent": {
|
||||
"__id__": 13
|
||||
},
|
||||
"fog": {
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 15
|
||||
},
|
||||
{
|
||||
"__id__": 16
|
||||
}
|
||||
],
|
||||
"_prefab": null,
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"_lrot": {
|
||||
"__type__": "cc.Quat",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0,
|
||||
"w": 1
|
||||
},
|
||||
"_lscale": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 1,
|
||||
"y": 1,
|
||||
"z": 1
|
||||
},
|
||||
"_mobility": 0,
|
||||
"_layer": 33554432,
|
||||
"_euler": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"_id": "8eSSv/RGRLXpSjHxNrb2iD"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.UITransform",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 14
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": null,
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 100,
|
||||
"height": 40
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5,
|
||||
"y": 0.5
|
||||
},
|
||||
"_id": "bdxkDQRzlHyqRhniZTc5/d"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Label",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 14
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": null,
|
||||
"_customMaterial": null,
|
||||
"_srcBlendFactor": 2,
|
||||
"_dstBlendFactor": 4,
|
||||
"_color": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 0,
|
||||
"g": 0,
|
||||
"b": 0,
|
||||
"a": 255
|
||||
},
|
||||
"_string": "НАЗАД",
|
||||
"_horizontalAlign": 1,
|
||||
"_verticalAlign": 1,
|
||||
"_actualFontSize": 26.166666666666668,
|
||||
"_fontSize": 20,
|
||||
"_fontFamily": "Arial",
|
||||
"_lineHeight": 40,
|
||||
"_overflow": 1,
|
||||
"_enableWrapText": false,
|
||||
"_font": null,
|
||||
"_isSystemFontUsed": true,
|
||||
"_spacingX": 0,
|
||||
"_isItalic": false,
|
||||
"_isBold": false,
|
||||
"_isUnderline": false,
|
||||
"_underlineHeight": 2,
|
||||
"_cacheMode": 0,
|
||||
"_enableOutline": false,
|
||||
"_outlineColor": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 0,
|
||||
"g": 0,
|
||||
"b": 0,
|
||||
"a": 255
|
||||
},
|
||||
"_outlineWidth": 2,
|
||||
"_enableShadow": false,
|
||||
"_shadowColor": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 0,
|
||||
"g": 0,
|
||||
"b": 0,
|
||||
"a": 255
|
||||
},
|
||||
"_shadowOffset": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 2,
|
||||
"y": 2
|
||||
},
|
||||
"_shadowBlur": 2,
|
||||
"_id": "ef1dxe0tZMj7iqcQYaDLZ9"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.UITransform",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 13
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": null,
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 100,
|
||||
"height": 40
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5,
|
||||
"y": 0.5
|
||||
},
|
||||
"_id": "af4elT6LhNmpENKNQVkz4l"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Sprite",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 13
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": null,
|
||||
"_customMaterial": null,
|
||||
"_srcBlendFactor": 2,
|
||||
"_dstBlendFactor": 4,
|
||||
"_color": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 214,
|
||||
"g": 214,
|
||||
"b": 214,
|
||||
"a": 255
|
||||
},
|
||||
"_spriteFrame": {
|
||||
"__uuid__": "20835ba4-6145-4fbc-a58a-051ce700aa3e@f9941",
|
||||
"__expectedType__": "cc.SpriteFrame"
|
||||
},
|
||||
"_type": 1,
|
||||
"_fillType": 0,
|
||||
"_sizeMode": 0,
|
||||
"_fillCenter": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"_fillStart": 0,
|
||||
"_fillRange": 0,
|
||||
"_isTrimmedMode": true,
|
||||
"_useGrayscale": false,
|
||||
"_atlas": null,
|
||||
"_id": "5aaLNCablJv70zWqg6R6au"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Button",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 13
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": null,
|
||||
"clickEvents": [
|
||||
{
|
||||
"__id__": 20
|
||||
}
|
||||
],
|
||||
"_interactable": true,
|
||||
"_transition": 1,
|
||||
"_normalColor": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 214,
|
||||
"g": 214,
|
||||
"b": 214,
|
||||
"a": 255
|
||||
},
|
||||
"_hoverColor": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 211,
|
||||
"g": 211,
|
||||
"b": 211,
|
||||
"a": 255
|
||||
},
|
||||
"_pressedColor": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 255,
|
||||
"g": 255,
|
||||
"b": 255,
|
||||
"a": 255
|
||||
},
|
||||
"_disabledColor": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 124,
|
||||
"g": 124,
|
||||
"b": 124,
|
||||
"a": 255
|
||||
},
|
||||
"_normalSprite": {
|
||||
"__uuid__": "20835ba4-6145-4fbc-a58a-051ce700aa3e@f9941",
|
||||
"__expectedType__": "cc.SpriteFrame"
|
||||
},
|
||||
"_hoverSprite": {
|
||||
"__uuid__": "20835ba4-6145-4fbc-a58a-051ce700aa3e@f9941",
|
||||
"__expectedType__": "cc.SpriteFrame"
|
||||
},
|
||||
"_pressedSprite": {
|
||||
"__uuid__": "544e49d6-3f05-4fa8-9a9e-091f98fc2ce8@f9941",
|
||||
"__expectedType__": "cc.SpriteFrame"
|
||||
},
|
||||
"_disabledSprite": {
|
||||
"__uuid__": "951249e0-9f16-456d-8b85-a6ca954da16b@f9941",
|
||||
"__expectedType__": "cc.SpriteFrame"
|
||||
},
|
||||
"_duration": 0.1,
|
||||
"_zoomScale": 1.2,
|
||||
"_target": {
|
||||
"__id__": 13
|
||||
},
|
||||
"_id": "21VtWEzAVIvJaMTjGE0rLq"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.ClickEvent",
|
||||
"target": {
|
||||
"__id__": 13
|
||||
},
|
||||
"component": "",
|
||||
"_componentId": "78f7278cNtNboFFr8iKBJ46",
|
||||
"handler": "onBackClick",
|
||||
"customEventData": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Widget",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 13
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": null,
|
||||
"_alignFlags": 9,
|
||||
"_target": null,
|
||||
"_left": 5,
|
||||
"_right": 0,
|
||||
"_top": 5,
|
||||
"_bottom": 0,
|
||||
"_horizontalCenter": 0,
|
||||
"_verticalCenter": 0,
|
||||
"_isAbsLeft": true,
|
||||
"_isAbsRight": true,
|
||||
"_isAbsTop": true,
|
||||
"_isAbsBottom": true,
|
||||
"_isAbsHorizontalCenter": true,
|
||||
"_isAbsVerticalCenter": true,
|
||||
"_originalWidth": 0,
|
||||
"_originalHeight": 0,
|
||||
"_alignMode": 2,
|
||||
"_lockFlags": 9,
|
||||
"_id": "485GyxVfVObbEv0Lu+fgWz"
|
||||
},
|
||||
{
|
||||
"__type__": "78f7278cNtNboFFr8iKBJ46",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 13
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": null,
|
||||
"targetScene": {
|
||||
"__uuid__": "955c22b7-7b7e-4af8-ad45-8415a0c23e60",
|
||||
"__expectedType__": "cc.SceneAsset"
|
||||
},
|
||||
"button": {
|
||||
"__id__": 19
|
||||
},
|
||||
"_id": "b1rhKm2LNE35aZjPg01Jy0"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.UITransform",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 10
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": null,
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 1280,
|
||||
"height": 720
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5,
|
||||
"y": 0.5
|
||||
},
|
||||
"_id": "4f1tpBW+ZJjoChRkZRRMqh"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Canvas",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 10
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": null,
|
||||
"_cameraComponent": {
|
||||
"__id__": 12
|
||||
},
|
||||
"_alignCanvasWithScreen": true,
|
||||
"_id": "05CFc1aXFGz7ouIAsjtOa2"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Widget",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 10
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": null,
|
||||
"_alignFlags": 45,
|
||||
"_target": null,
|
||||
"_left": 0,
|
||||
"_right": 0,
|
||||
"_top": 0,
|
||||
"_bottom": 0,
|
||||
"_horizontalCenter": 0,
|
||||
"_verticalCenter": 0,
|
||||
"_isAbsLeft": true,
|
||||
"_isAbsRight": true,
|
||||
"_isAbsTop": true,
|
||||
"_isAbsBottom": true,
|
||||
"_isAbsHorizontalCenter": true,
|
||||
"_isAbsVerticalCenter": true,
|
||||
"_originalWidth": 0,
|
||||
"_originalHeight": 0,
|
||||
"_alignMode": 2,
|
||||
"_lockFlags": 0,
|
||||
"_id": "bckGXntVhOEKTI5/U+lyHG"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.SceneGlobals",
|
||||
"ambient": {
|
||||
"__id__": 27
|
||||
},
|
||||
"shadows": {
|
||||
"__id__": 28
|
||||
},
|
||||
"_skybox": {
|
||||
"__id__": 29
|
||||
},
|
||||
"fog": {
|
||||
"__id__": 30
|
||||
},
|
||||
"octree": {
|
||||
"__id__": 15
|
||||
"__id__": 31
|
||||
},
|
||||
"skin": {
|
||||
"__id__": 16
|
||||
"__id__": 32
|
||||
},
|
||||
"lightProbeInfo": {
|
||||
"__id__": 17
|
||||
"__id__": 33
|
||||
},
|
||||
"postSettings": {
|
||||
"__id__": 18
|
||||
"__id__": 34
|
||||
},
|
||||
"bakedWithStationaryMainLight": false,
|
||||
"bakedWithHighpLightmap": false
|
||||
|
||||
@ -18,16 +18,10 @@ export class FirstPersonController extends Component {
|
||||
@property
|
||||
public maxSpeed: number = 20;
|
||||
|
||||
// Вектор направления движения
|
||||
// Movement and rotation state
|
||||
private _moveDirection: Vec3 = new Vec3();
|
||||
|
||||
// Храним текущие углы поворота (в градусах)
|
||||
private _eulerAngles: Vec3 = new Vec3();
|
||||
|
||||
// Флаг нажатия левой кнопки мыши
|
||||
private _isLeftMousePressed: boolean = false;
|
||||
|
||||
// Для эмитации события движения – запоминаем последнее положение
|
||||
private _lastEmittedPosition: Vec3 = new Vec3();
|
||||
|
||||
onLoad() {
|
||||
@ -38,58 +32,41 @@ export class FirstPersonController extends Component {
|
||||
input.on(Input.EventType.MOUSE_MOVE, this._onMouseMove, this);
|
||||
input.on(Input.EventType.MOUSE_WHEEL, this._onMouseWheel, this);
|
||||
|
||||
// Инициализируем углы текущей ориентацией ноды player
|
||||
// Initialize rotation angles
|
||||
this._eulerAngles = this.node.eulerAngles.clone();
|
||||
// Сохраняем начальное положение для эмитации события "moved"
|
||||
// Save start position for "moved" event
|
||||
this._lastEmittedPosition = this.node.getPosition().clone();
|
||||
}
|
||||
|
||||
onDestroy() {
|
||||
input.off(Input.EventType.KEY_DOWN, this._onKeyDown, this);
|
||||
input.off(Input.EventType.KEY_UP, this._onKeyUp, this);
|
||||
input.off(Input.EventType.MOUSE_DOWN, this._onMouseDown, this);
|
||||
input.off(Input.EventType.MOUSE_UP, this._onMouseUp, this);
|
||||
input.off(Input.EventType.MOUSE_MOVE, this._onMouseMove, this);
|
||||
input.off(Input.EventType.MOUSE_WHEEL, this._onMouseWheel, this);
|
||||
// Safely unsubscribe from input events
|
||||
input?.off(Input.EventType.KEY_DOWN, this._onKeyDown, this);
|
||||
input?.off(Input.EventType.KEY_UP, this._onKeyUp, this);
|
||||
input?.off(Input.EventType.MOUSE_DOWN, this._onMouseDown, this);
|
||||
input?.off(Input.EventType.MOUSE_UP, this._onMouseUp, this);
|
||||
input?.off(Input.EventType.MOUSE_MOVE, this._onMouseMove, this);
|
||||
input?.off(Input.EventType.MOUSE_WHEEL, this._onMouseWheel, this);
|
||||
}
|
||||
|
||||
private _onKeyDown(event: EventKeyboard) {
|
||||
switch (event.keyCode) {
|
||||
case KeyCode.KEY_W:
|
||||
this._moveDirection.z = 1;
|
||||
break;
|
||||
case KeyCode.KEY_S:
|
||||
this._moveDirection.z = -1;
|
||||
break;
|
||||
case KeyCode.KEY_A:
|
||||
this._moveDirection.x = -1;
|
||||
break;
|
||||
case KeyCode.KEY_D:
|
||||
this._moveDirection.x = 1;
|
||||
break;
|
||||
case KeyCode.KEY_Q:
|
||||
this._moveDirection.y = -1;
|
||||
break;
|
||||
case KeyCode.KEY_E:
|
||||
this._moveDirection.y = 1;
|
||||
break;
|
||||
case KeyCode.KEY_W: this._moveDirection.z = 1; break;
|
||||
case KeyCode.KEY_S: this._moveDirection.z = -1; break;
|
||||
case KeyCode.KEY_A: this._moveDirection.x = -1; break;
|
||||
case KeyCode.KEY_D: this._moveDirection.x = 1; break;
|
||||
case KeyCode.KEY_Q: this._moveDirection.y = -1; break;
|
||||
case KeyCode.KEY_E: this._moveDirection.y = 1; break;
|
||||
}
|
||||
}
|
||||
|
||||
private _onKeyUp(event: EventKeyboard) {
|
||||
switch (event.keyCode) {
|
||||
case KeyCode.KEY_W:
|
||||
case KeyCode.KEY_S:
|
||||
this._moveDirection.z = 0;
|
||||
break;
|
||||
case KeyCode.KEY_S: this._moveDirection.z = 0; break;
|
||||
case KeyCode.KEY_A:
|
||||
case KeyCode.KEY_D:
|
||||
this._moveDirection.x = 0;
|
||||
break;
|
||||
case KeyCode.KEY_D: this._moveDirection.x = 0; break;
|
||||
case KeyCode.KEY_Q:
|
||||
case KeyCode.KEY_E:
|
||||
this._moveDirection.y = 0;
|
||||
break;
|
||||
case KeyCode.KEY_E: this._moveDirection.y = 0; break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -106,23 +83,17 @@ export class FirstPersonController extends Component {
|
||||
}
|
||||
|
||||
private _onMouseMove(event: EventMouse) {
|
||||
if (this._isLeftMousePressed) {
|
||||
// Обновляем углы поворота: горизонтальный (yaw) и вертикальный (pitch)
|
||||
this._eulerAngles.y -= event.movementX * this.lookSpeed;
|
||||
this._eulerAngles.x -= event.movementY * this.lookSpeed;
|
||||
// Ограничиваем pitch, чтобы не перевернуться
|
||||
this._eulerAngles.x = Math.max(-89, Math.min(89, this._eulerAngles.x));
|
||||
if (!this._isLeftMousePressed) return;
|
||||
// Update yaw and pitch
|
||||
this._eulerAngles.y -= event.movementX * this.lookSpeed;
|
||||
this._eulerAngles.x -= event.movementY * this.lookSpeed;
|
||||
this._eulerAngles.x = Math.max(-89, Math.min(89, this._eulerAngles.x));
|
||||
|
||||
// Применяем поворот к ноде player
|
||||
const newQuat = new Quat();
|
||||
Quat.fromEuler(newQuat, this._eulerAngles.x, this._eulerAngles.y, 0);
|
||||
this.node.setRotation(newQuat);
|
||||
|
||||
// Если камера дочерняя нода, сбрасываем её локальное вращение
|
||||
if (this.camera) {
|
||||
this.camera.setRotation(Quat.IDENTITY);
|
||||
}
|
||||
}
|
||||
// Apply rotation
|
||||
const newQuat = Quat.fromEuler(new Quat(), this._eulerAngles.x, this._eulerAngles.y, 0);
|
||||
this.node.setRotation(newQuat);
|
||||
// Reset camera local rotation if child
|
||||
this.camera?.setRotation(Quat.IDENTITY);
|
||||
}
|
||||
|
||||
private _onMouseWheel(event: EventMouse) {
|
||||
@ -135,23 +106,19 @@ export class FirstPersonController extends Component {
|
||||
}
|
||||
|
||||
update(deltaTime: number) {
|
||||
// Вычисляем направление движения с учётом ориентации игрока
|
||||
// Movement in world space
|
||||
const forward = Vec3.transformQuat(new Vec3(), Vec3.FORWARD, this.node.worldRotation);
|
||||
const right = Vec3.transformQuat(new Vec3(), Vec3.RIGHT, this.node.worldRotation);
|
||||
|
||||
const move = new Vec3();
|
||||
Vec3.scaleAndAdd(move, move, forward, this._moveDirection.z * this.moveSpeed * deltaTime);
|
||||
Vec3.scaleAndAdd(move, move, right, this._moveDirection.x * this.moveSpeed * deltaTime);
|
||||
Vec3.scaleAndAdd(move, move, Vec3.UP, this._moveDirection.y * this.moveSpeed * deltaTime);
|
||||
|
||||
// Перемещаем игрока в мировом пространстве
|
||||
this.node.translate(move, NodeSpace.WORLD);
|
||||
|
||||
// После перемещения проверяем, изменилась ли позиция существенно, чтобы эмитировать событие "moved"
|
||||
// Emit "moved" if significant change
|
||||
const currentPos = this.node.getPosition();
|
||||
if (Vec3.distance(currentPos, this._lastEmittedPosition) > 0.1) {
|
||||
this.node.emit('moved');
|
||||
// Обновляем последнее сохранённое положение
|
||||
this._lastEmittedPosition = currentPos.clone();
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,121 +2,89 @@
|
||||
import { _decorator, Component, MeshRenderer, Material, Color, math } from "cc";
|
||||
import { apiSensors } from "./stores/apiSensors";
|
||||
import { EquipmentManager } from "./stores/EquipmentManager";
|
||||
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@ccclass("PulsatingHighlighter")
|
||||
export class PulsatingHighlighter extends Component {
|
||||
@property(Material)
|
||||
redMaterial: Material = null!;
|
||||
@property(Material) redMaterial: Material = null!;
|
||||
@property(Material) greenMaterial: Material = null!;
|
||||
@property(Material) yellowMaterial: Material = null!;
|
||||
|
||||
@property(Material)
|
||||
greenMaterial: Material = null!;
|
||||
|
||||
@property(Material)
|
||||
yellowMaterial: Material = null!;
|
||||
|
||||
// Храним оригинальные материалы для восстановления
|
||||
private _originalMaterials: Material[] = [];
|
||||
private _currentAlpha = 0;
|
||||
private _direction = 1;
|
||||
private _animationSpeed = 3; // Скорость анимации пульсации
|
||||
private _animationSpeed = 3;
|
||||
|
||||
// Статическая переменная для хранения активного экземпляра
|
||||
private static _activeInstance: PulsatingHighlighter | null = null;
|
||||
|
||||
// Свойство для поиска соответствующего датчика (если используется)
|
||||
@property
|
||||
public sensorName: string = "";
|
||||
|
||||
// Флаг, определяющий, должна ли происходить авто-подсветка при обновлении данных
|
||||
@property
|
||||
public autoHighlight: boolean = false;
|
||||
@property public sensorName: string = "";
|
||||
@property public autoHighlight: boolean = false;
|
||||
|
||||
onLoad() {
|
||||
this._storeOriginalMaterials();
|
||||
// Если авто-подсветка включена, подписываемся на обновления EquipmentManager
|
||||
if (this.autoHighlight) {
|
||||
this.waitForEquipmentManager();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private waitForEquipmentManager() {
|
||||
if (!EquipmentManager.instance) {
|
||||
this.scheduleOnce(() => { this.waitForEquipmentManager(); }, 0.1);
|
||||
this.scheduleOnce(() => this.waitForEquipmentManager(), 0.1);
|
||||
return;
|
||||
}
|
||||
EquipmentManager.instance.node.on('data-updated', this._onDataUpdated, this);
|
||||
}
|
||||
|
||||
|
||||
private _storeOriginalMaterials() {
|
||||
const renderer = this.node.getComponent(MeshRenderer);
|
||||
if (!renderer) return;
|
||||
|
||||
this._originalMaterials = renderer.materials
|
||||
.filter((m): m is Material => !!m)
|
||||
.map((m) => {
|
||||
const newMat = new Material();
|
||||
newMat.copy(m);
|
||||
return newMat;
|
||||
.map(m => {
|
||||
const copy = new Material();
|
||||
copy.copy(m);
|
||||
return copy;
|
||||
});
|
||||
}
|
||||
|
||||
private _onDataUpdated() {
|
||||
// Если авто-подсветка выключена, не реагируем на обновления данных
|
||||
if (!this.autoHighlight) return;
|
||||
|
||||
const sensors: apiSensors[] = EquipmentManager.instance.dataList;
|
||||
const sensorData = sensors.find((s) => s.name === this.sensorName);
|
||||
if (sensorData) {
|
||||
let color = "";
|
||||
if (sensorData.value === 2) {
|
||||
color = "red";
|
||||
} else if (sensorData.value === 1) {
|
||||
color = "green";
|
||||
} else if (sensorData.value === 0) {
|
||||
color = "yellow";
|
||||
} else {
|
||||
console.warn(`Неожиданное значение sensorData.value: ${sensorData.value}`);
|
||||
return;
|
||||
}
|
||||
this.switchToColor(color);
|
||||
}
|
||||
const data = EquipmentManager.instance.dataList.find(s => s.name === this.sensorName);
|
||||
if (!data) return;
|
||||
const color = data.value === 2 ? 'red'
|
||||
: data.value === 1 ? 'green'
|
||||
: data.value === 0 ? 'yellow'
|
||||
: '';
|
||||
if (color) this.switchToColor(color);
|
||||
}
|
||||
|
||||
public switchToColor(color: string) {
|
||||
const renderer = this.node.getComponent(MeshRenderer);
|
||||
if (!renderer) return;
|
||||
|
||||
// Если уже есть активный объект и он не этот, сбрасываем его подсветку
|
||||
// Если есть другой активный хайлайтер — сбросим его, но только если его node ещё жив
|
||||
if (PulsatingHighlighter._activeInstance && PulsatingHighlighter._activeInstance !== this) {
|
||||
PulsatingHighlighter._activeInstance.resetHighlight();
|
||||
const prev = PulsatingHighlighter._activeInstance;
|
||||
if (prev.node) {
|
||||
prev.resetHighlight();
|
||||
}
|
||||
}
|
||||
PulsatingHighlighter._activeInstance = this;
|
||||
|
||||
let selectedMaterial: Material | null = null;
|
||||
if (color === "red" && this.redMaterial) {
|
||||
selectedMaterial = this.redMaterial;
|
||||
} else if (color === "green" && this.greenMaterial) {
|
||||
selectedMaterial = this.greenMaterial;
|
||||
} else if (color === "yellow" && this.yellowMaterial) {
|
||||
selectedMaterial = this.yellowMaterial;
|
||||
} else {
|
||||
console.warn(`Неизвестный цвет "${color}", используем оригинальный.`);
|
||||
return;
|
||||
}
|
||||
// Выбираем материал
|
||||
let sel: Material | null = null;
|
||||
if (color === 'red') sel = this.redMaterial;
|
||||
else if (color === 'green') sel = this.greenMaterial;
|
||||
else if (color === 'yellow') sel = this.yellowMaterial;
|
||||
if (!sel) return;
|
||||
|
||||
// Создаем копию выбранного материала для эффекта подсветки
|
||||
const highlightMat = new Material();
|
||||
highlightMat.copy(selectedMaterial);
|
||||
// Применяем и запускаем анимацию
|
||||
const highlightMat = new Material(); highlightMat.copy(sel);
|
||||
renderer.materials = renderer.materials.map(() => highlightMat);
|
||||
|
||||
// Запускаем анимацию пульсации
|
||||
this._currentAlpha = 0;
|
||||
this._direction = 1;
|
||||
this._currentAlpha = 0; this._direction = 1;
|
||||
this.schedule(this._updateAlpha, 0.016);
|
||||
|
||||
// Через 10 секунд возвращаем объект в исходное состояние, если он активен
|
||||
// Запланируем сброс через 10 секунд
|
||||
this.scheduleOnce(() => {
|
||||
if (PulsatingHighlighter._activeInstance === this) {
|
||||
this.resetHighlight();
|
||||
@ -128,22 +96,18 @@ export class PulsatingHighlighter extends Component {
|
||||
private _updateAlpha() {
|
||||
this._currentAlpha += this._direction * this._animationSpeed;
|
||||
this._currentAlpha = math.clamp(this._currentAlpha, 0, 255);
|
||||
if (this._currentAlpha === 0 || this._currentAlpha === 255) this._direction *= -1;
|
||||
|
||||
if (this._currentAlpha === 255 || this._currentAlpha === 0) {
|
||||
this._direction *= -1;
|
||||
}
|
||||
|
||||
const renderer = this.node.getComponent(MeshRenderer);
|
||||
const renderer = this.node?.getComponent(MeshRenderer);
|
||||
if (renderer) {
|
||||
renderer.materials.forEach((mat) => {
|
||||
const mainColor = mat?.getProperty("mainColor") as Color;
|
||||
mainColor.a = this._currentAlpha;
|
||||
mat?.setProperty("mainColor", mainColor);
|
||||
renderer.materials.forEach(mat => {
|
||||
const c = mat?.getProperty('mainColor') as Color;
|
||||
c.a = this._currentAlpha;
|
||||
mat?.setProperty('mainColor', c);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// Сброс подсветки: остановка анимации и восстановление оригинальных материалов
|
||||
public resetHighlight() {
|
||||
this.unschedule(this._updateAlpha);
|
||||
this.unscheduleAllCallbacks();
|
||||
@ -151,20 +115,24 @@ export class PulsatingHighlighter extends Component {
|
||||
}
|
||||
|
||||
private _restoreOriginalMaterials() {
|
||||
// Guard: node мог быть уничтожен
|
||||
if (!this.node) return;
|
||||
const renderer = this.node.getComponent(MeshRenderer);
|
||||
if (!renderer) return;
|
||||
|
||||
renderer.materials = this._originalMaterials.map((m) => {
|
||||
const mat = new Material();
|
||||
mat.copy(m);
|
||||
return mat;
|
||||
renderer.materials = this._originalMaterials.map(orig => {
|
||||
const copy = new Material();
|
||||
copy.copy(orig);
|
||||
return copy;
|
||||
});
|
||||
}
|
||||
|
||||
onDestroy() {
|
||||
// Снимаем подписку и сбрасываем статический инстанс, если он — наш
|
||||
EquipmentManager.instance?.node?.off('data-updated', this._onDataUpdated, this);
|
||||
this.unscheduleAllCallbacks();
|
||||
if (EquipmentManager.instance) {
|
||||
EquipmentManager.instance.node.off('data-updated', this._onDataUpdated, this);
|
||||
if (PulsatingHighlighter._activeInstance === this) {
|
||||
PulsatingHighlighter._activeInstance = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/* EquipmentManager.ts simplified without mutex */
|
||||
import { _decorator, Component } from 'cc';
|
||||
// EquipmentManager.ts
|
||||
import { _decorator, Component, director } from 'cc';
|
||||
import { apiSensors } from './apiSensors';
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@ -7,20 +7,25 @@ const { ccclass, property } = _decorator;
|
||||
export class EquipmentManager extends Component {
|
||||
public static instance: EquipmentManager;
|
||||
|
||||
@property
|
||||
|
||||
public apiUrl: string = 'http://localhost:3030/api/v2/sensors';
|
||||
|
||||
private _dataList: apiSensors[] = [];
|
||||
public totalCount: number = 0;
|
||||
private _intervalId: number | null = null;
|
||||
|
||||
// Используем оператор "!" для отложенной инициализации
|
||||
|
||||
public initialDataPromise!: Promise<void>;
|
||||
|
||||
onLoad() {
|
||||
// Сохраняем синглтон
|
||||
EquipmentManager.instance = this;
|
||||
// Промис будет разрешён после первой загрузки данных
|
||||
|
||||
// Делаем этот узел персистентным — он не будет уничтожаться при loadScene
|
||||
director.addPersistRootNode(this.node);
|
||||
|
||||
// Первичная загрузка и Promise для крайних случаев
|
||||
this.initialDataPromise = this.loadItems();
|
||||
// Подписка на периодическое обновление
|
||||
this._intervalId = window.setInterval(() => {
|
||||
this.loadItems();
|
||||
}, 10000);
|
||||
@ -34,14 +39,13 @@ export class EquipmentManager extends Component {
|
||||
try {
|
||||
const response = await fetch(this.apiUrl);
|
||||
const data = await response.json();
|
||||
if (data && data.items && Array.isArray(data.items)) {
|
||||
if (data?.items && Array.isArray(data.items)) {
|
||||
this._dataList = data.items;
|
||||
this.totalCount = this._dataList.length;
|
||||
console.log('Данные оборудования обновлены:', this._dataList);
|
||||
|
||||
// Триггерим событие, на которое подписывается LazyLoadList
|
||||
this.node.emit('data-updated');
|
||||
} else {
|
||||
console.error('Некорректный формат данных', data);
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('Ошибка при загрузке данных:', error);
|
||||
}
|
||||
@ -52,6 +56,9 @@ export class EquipmentManager extends Component {
|
||||
}
|
||||
|
||||
onDestroy() {
|
||||
// Если по какой-то причине хотите убрать persist:
|
||||
// director.removePersistRootNode(this.node);
|
||||
|
||||
if (this._intervalId !== null) {
|
||||
window.clearInterval(this._intervalId);
|
||||
this._intervalId = null;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
// ErrorManager.ts
|
||||
import { _decorator, Component, Node, AudioSource } from 'cc';
|
||||
// scripts/stores/ErrorManager.ts
|
||||
import { _decorator, Component, Node, AudioSource, director } from 'cc';
|
||||
import { EquipmentManager } from './EquipmentManager';
|
||||
import { apiSensors } from './apiSensors';
|
||||
import { ErrorsStore, ApiErrorsResponse } from './ErrorsStore';
|
||||
@ -8,100 +8,126 @@ const { ccclass, property } = _decorator;
|
||||
|
||||
@ccclass('ErrorManager')
|
||||
export class ErrorManager extends Component {
|
||||
@property(Node)
|
||||
public errorListNode: Node = null!;
|
||||
@property(Node)
|
||||
public errorListNode: Node = null!;
|
||||
|
||||
@property(AudioSource)
|
||||
@property(AudioSource)
|
||||
public audioSource: AudioSource | null = null;
|
||||
|
||||
private soundEnabled = true;
|
||||
private currentErrors: string[] = [];
|
||||
private errorItems: apiSensors[] = [];
|
||||
private disabledAlerts: string[] = [];
|
||||
// Инициализируем через getInstance()
|
||||
private errorsStore = ErrorsStore.getInstance();
|
||||
|
||||
private soundEnabled: boolean = true;
|
||||
private currentErrors: string[] = [];
|
||||
private errorItems: apiSensors[] = [];
|
||||
private disabledAlerts: string[] = [];
|
||||
// Используем единый экземпляр ErrorsStore (Singleton)
|
||||
private errorsStore: ErrorsStore = ErrorsStore.instance;
|
||||
static instance: ErrorManager;
|
||||
|
||||
static instance: ErrorManager;
|
||||
onLoad() {
|
||||
ErrorManager.instance = this;
|
||||
// Делаем узел устойчивым к смене сцен
|
||||
director.addPersistRootNode(this.node);
|
||||
this.node.on('touchstart', this.disableSoundAlert, this);
|
||||
}
|
||||
|
||||
onLoad() {
|
||||
ErrorManager.instance = this;
|
||||
this.node.on('touchstart', this.disableSoundAlert, this);
|
||||
start() {
|
||||
EquipmentManager.instance?.node?.on('data-updated', this.checkErrors, this);
|
||||
this.schedule(this.checkErrors, 5);
|
||||
this.schedule(this.fetchApiErrors, 10);
|
||||
}
|
||||
|
||||
onDestroy() {
|
||||
this.node.off('touchstart', this.disableSoundAlert, this);
|
||||
EquipmentManager.instance?.node?.off('data-updated', this.checkErrors, this);
|
||||
this.unscheduleAllCallbacks();
|
||||
}
|
||||
|
||||
/**
|
||||
* Возвращает список текущих локальных ошибок по оборудованию и ошибки из API.
|
||||
*/
|
||||
public getErrorList(): { equipmentErrors: apiSensors[]; apiErrors: ApiErrorsResponse } {
|
||||
return {
|
||||
equipmentErrors: this.errorItems,
|
||||
apiErrors: this.errorsStore.getApiErrors(),
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Проверка локальных состояний ошибок по EquipmentManager.
|
||||
* Добавляет новые, убирает снятые, эмитит 'errors-updated'.
|
||||
*/
|
||||
checkErrors() {
|
||||
const dataList = EquipmentManager.instance?.dataList ?? [];
|
||||
let updated = false;
|
||||
|
||||
// Фильтруем снятые ошибки
|
||||
const prevErrors = [...this.currentErrors];
|
||||
this.currentErrors = this.currentErrors.filter(tag =>
|
||||
dataList.some(item => item.tag === tag && item.value === 2)
|
||||
);
|
||||
if (prevErrors.length !== this.currentErrors.length) {
|
||||
this.errorItems = this.errorItems.filter(item =>
|
||||
dataList.some(it => it.tag === item.tag && it.value === 2)
|
||||
);
|
||||
updated = true;
|
||||
}
|
||||
|
||||
start() {
|
||||
if (EquipmentManager.instance) {
|
||||
EquipmentManager.instance.node.on('data-updated', this.checkErrors, this);
|
||||
this.schedule(this.checkErrors, 5);
|
||||
} else {
|
||||
|
||||
// Добавляем новые ошибки
|
||||
dataList.forEach(item => {
|
||||
if (item.value === 2 && this.currentErrors.indexOf(item.tag) === -1) {
|
||||
this.currentErrors.push(item.tag);
|
||||
this.errorItems.push(item);
|
||||
this.addErrorToUI(item);
|
||||
updated = true;
|
||||
if (this.soundEnabled && this.disabledAlerts.indexOf(item.tag) === -1) {
|
||||
this.audioSource?.play();
|
||||
}
|
||||
this.schedule(() => { this.fetchApiErrors(); }, 10);
|
||||
}
|
||||
});
|
||||
|
||||
if (updated) {
|
||||
this.node.emit('errors-updated');
|
||||
}
|
||||
// Всегда проверяем API-ошибки после локальных изменений
|
||||
this.fetchApiErrors();
|
||||
}
|
||||
|
||||
public getErrorList(): { equipmentErrors: apiSensors[], apiErrors: ApiErrorsResponse } {
|
||||
return { equipmentErrors: this.errorItems, apiErrors: this.errorsStore.getApiErrors() };
|
||||
/**
|
||||
* Запрашивает свежие ошибки у API и эмитит 'errors-updated'.
|
||||
*/
|
||||
async fetchApiErrors() {
|
||||
try {
|
||||
await this.errorsStore.fetchApiErrors();
|
||||
this.node.emit('errors-updated');
|
||||
} catch (e) {
|
||||
console.error('ErrorManager.fetchApiErrors:', e);
|
||||
}
|
||||
}
|
||||
|
||||
checkErrors() {
|
||||
const dataList = EquipmentManager.instance.dataList;
|
||||
let updated = false;
|
||||
/**
|
||||
* Добавляет запись об ошибке в UI-список.
|
||||
* Реализуйте логику вставки нод в this.errorListNode.
|
||||
*/
|
||||
addErrorToUI(item: apiSensors) {
|
||||
// TODO: ваша логика по созданию и добавлению ноды в this.errorListNode
|
||||
}
|
||||
|
||||
const prevErrors = [...this.currentErrors];
|
||||
this.currentErrors = this.currentErrors.filter(tag =>
|
||||
dataList.some(item => item.tag === tag && item.value === 2)
|
||||
);
|
||||
if (prevErrors.length !== this.currentErrors.length) {
|
||||
this.errorItems = this.errorItems.filter(item =>
|
||||
dataList.some(it => it.tag === item.tag && it.value === 2)
|
||||
);
|
||||
updated = true;
|
||||
}
|
||||
/** Отключает проигрывание звуковых оповещений. */
|
||||
disableSoundAlert() {
|
||||
this.soundEnabled = false;
|
||||
}
|
||||
|
||||
dataList.forEach(item => {
|
||||
if (item.value === 2 && this.currentErrors.indexOf(item.tag) === -1) {
|
||||
this.currentErrors.push(item.tag);
|
||||
this.errorItems.push(item);
|
||||
this.addErrorToUI(item);
|
||||
updated = true;
|
||||
if (this.soundEnabled && this.disabledAlerts.indexOf(item.tag) === -1) {
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
if (updated) {
|
||||
this.node.emit('errors-updated');
|
||||
}
|
||||
this.fetchApiErrors();
|
||||
/** Помечает ошибку как «заблокированную» — звук для неё больше не будет играться. */
|
||||
public disableAlertForError(tag: string): void {
|
||||
if (this.disabledAlerts.indexOf(tag) === -1) {
|
||||
this.disabledAlerts.push(tag);
|
||||
}
|
||||
}
|
||||
|
||||
async fetchApiErrors() {
|
||||
await this.errorsStore.fetchApiErrors();
|
||||
this.node.emit('errors-updated');
|
||||
}
|
||||
|
||||
addErrorToUI(item: apiSensors) {
|
||||
|
||||
// Реализация обновления UI
|
||||
}
|
||||
|
||||
|
||||
|
||||
disableSoundAlert() {
|
||||
this.soundEnabled = false;
|
||||
}
|
||||
|
||||
public disableAlertForError(tag: string): void {
|
||||
if (this.disabledAlerts.indexOf(tag) === -1) {
|
||||
this.disabledAlerts.push(tag);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
confirmError(tag: string) {
|
||||
this.currentErrors = this.currentErrors.filter(e => e !== tag);
|
||||
this.errorItems = this.errorItems.filter(item => item.tag !== tag);
|
||||
|
||||
this.node.emit('errors-updated');
|
||||
}
|
||||
/** Подтверждает ошибку — удаляет её из локального списка. */
|
||||
confirmError(tag: string) {
|
||||
this.currentErrors = this.currentErrors.filter(e => e !== tag);
|
||||
this.errorItems = this.errorItems.filter(item => item.tag !== tag);
|
||||
this.node.emit('errors-updated');
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,8 +1,3 @@
|
||||
import { _decorator, } from 'cc';
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
|
||||
|
||||
export interface ApiError {
|
||||
alarmCode: number;
|
||||
description: string;
|
||||
@ -13,37 +8,50 @@ export interface ApiErrorsResponse {
|
||||
[sensorName: string]: ApiError[];
|
||||
}
|
||||
|
||||
@ccclass('ErrorsStore')
|
||||
/**
|
||||
* ErrorsStore — обычный TypeScript singleton для хранения и загрузки ошибок.
|
||||
* Независим от Cocos Creator (@ccclass).
|
||||
*/
|
||||
export class ErrorsStore {
|
||||
private static _instance: ErrorsStore;
|
||||
private static _instance: ErrorsStore | null = null;
|
||||
private apiErrors: ApiErrorsResponse = {};
|
||||
|
||||
/**
|
||||
* Скрытый конструктор для предотвращения создания дополнительных экземпляров.
|
||||
*/
|
||||
private constructor() {}
|
||||
|
||||
public static get instance(): ErrorsStore {
|
||||
/**
|
||||
* Получить единственный экземпляр ErrorsStore.
|
||||
*/
|
||||
public static getInstance(): ErrorsStore {
|
||||
if (!ErrorsStore._instance) {
|
||||
ErrorsStore._instance = new ErrorsStore();
|
||||
}
|
||||
return ErrorsStore._instance;
|
||||
}
|
||||
|
||||
// Асинхронный запрос ошибок с API
|
||||
async fetchApiErrors(): Promise<void> {
|
||||
/**
|
||||
* Асинхронно загрузить ошибки с API и сохранить в хранилище.
|
||||
*/
|
||||
public async fetchApiErrors(): Promise<void> {
|
||||
try {
|
||||
const response = await fetch("http://localhost:3030/api/v2/errors");
|
||||
if (response.ok) {
|
||||
const errors = await response.json() as ApiErrorsResponse;
|
||||
this.apiErrors = errors;
|
||||
} else {
|
||||
console.error("Ошибка при получении ошибок с API, статус:", response.status);
|
||||
if (!response.ok) {
|
||||
console.error("ErrorsStore: ошибка при получении ошибок, статус:", response.status);
|
||||
return;
|
||||
}
|
||||
const errors = (await response.json()) as ApiErrorsResponse;
|
||||
this.apiErrors = errors;
|
||||
} catch (error) {
|
||||
console.error("Ошибка запроса ошибок с API:", error);
|
||||
console.error("ErrorsStore: ошибка запроса ошибок с API:", error);
|
||||
}
|
||||
}
|
||||
|
||||
// Получение текущего состояния ошибок с API
|
||||
getApiErrors(): ApiErrorsResponse {
|
||||
/**
|
||||
* Вернуть текущее состояние ошибок.
|
||||
*/
|
||||
public getApiErrors(): ApiErrorsResponse {
|
||||
return this.apiErrors;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,3 +1,4 @@
|
||||
// SensorDetailManager.ts
|
||||
import { _decorator, Component, Node } from 'cc';
|
||||
import { SensorDetailStore } from './SensorDetailStore';
|
||||
import { ErrorLazyLoadList } from '../ui/ErrorLazyLoadList';
|
||||
@ -5,48 +6,50 @@ const { ccclass } = _decorator;
|
||||
|
||||
@ccclass('SensorDetailManager')
|
||||
export class SensorDetailManager extends Component {
|
||||
private currentSensorName: string = "";
|
||||
private currentSensorName: string = '';
|
||||
|
||||
onLoad() {
|
||||
const equipmentManagerNode = this.node.scene.getChildByName('EquipmentManager');
|
||||
if (equipmentManagerNode) {
|
||||
equipmentManagerNode.on('showSensorDetails', this.onShowSensorDetails, this);
|
||||
}
|
||||
// Подпишемся только если менеджер существует в сцене
|
||||
const equipmentManagerNode = this.node.scene?.getChildByName('EquipmentManager');
|
||||
equipmentManagerNode?.on('showSensorDetails', this.onShowSensorDetails, this);
|
||||
}
|
||||
|
||||
onDestroy() {
|
||||
// Отпишемся и уберём все расписанные коллбэки
|
||||
const equipmentManagerNode = this.node.scene?.getChildByName('EquipmentManager');
|
||||
equipmentManagerNode?.off('showSensorDetails', this.onShowSensorDetails, this);
|
||||
this.unscheduleAllCallbacks();
|
||||
}
|
||||
|
||||
/**
|
||||
* Обработчик события показа деталей датчика.
|
||||
* Получает имя датчика, запрашивает данные и передаёт их компоненту, который отрисовывает список.
|
||||
* @param sensorName Имя выбранного датчика/оборудования.
|
||||
*/
|
||||
public onShowSensorDetails(sensorName: string) {
|
||||
// Если уже показываем детали того же датчика — ничего не делаем
|
||||
if (this.currentSensorName === sensorName && ErrorLazyLoadList.instance?.mode === 'details') {
|
||||
// Если датчик не изменился и уже отображаем details, то ничего не делаем
|
||||
return;
|
||||
}
|
||||
|
||||
this.currentSensorName = sensorName;
|
||||
|
||||
// Сбрасываем предыдущий интервал обновлений
|
||||
this.unschedule(this.updateSensorDetails);
|
||||
|
||||
// Запросим и отобразим детали
|
||||
SensorDetailStore.getInstance().fetchSensorDetails(sensorName)
|
||||
.then(data => {
|
||||
if (data && ErrorLazyLoadList.instance) {
|
||||
ErrorLazyLoadList.instance.showSensorDetails(data);
|
||||
}
|
||||
});
|
||||
})
|
||||
.catch(console.error);
|
||||
|
||||
// Запланируем периодические обновления, если компонент активен
|
||||
if (this.node.active) {
|
||||
this.schedule(this.updateSensorDetails, 5);
|
||||
}
|
||||
|
||||
this.node.active = true;
|
||||
}
|
||||
|
||||
|
||||
onEnable() {
|
||||
// При включении заново запускаем обновления, если есть текущий датчик
|
||||
if (this.currentSensorName) {
|
||||
// Убедимся, что обновление не запускается дважды
|
||||
this.unschedule(this.updateSensorDetails);
|
||||
this.schedule(this.updateSensorDetails, 5);
|
||||
}
|
||||
@ -56,24 +59,16 @@ export class SensorDetailManager extends Component {
|
||||
this.unschedule(this.updateSensorDetails);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Периодическое обновление данных датчика (если активно).
|
||||
* Получает обновлённые данные и передаёт их в ErrorLazyLoadList для перерисовки.
|
||||
*/
|
||||
private updateSensorDetails() {
|
||||
if (!this.currentSensorName) return;
|
||||
|
||||
SensorDetailStore.getInstance()
|
||||
.fetchSensorDetails(this.currentSensorName)
|
||||
.then(data => {
|
||||
if (data && ErrorLazyLoadList.instance) {
|
||||
// Проверяем текущий режим перед обновлением
|
||||
if (ErrorLazyLoadList.instance.mode === "details") {
|
||||
ErrorLazyLoadList.instance.showSensorDetails(data);
|
||||
}
|
||||
if (data && ErrorLazyLoadList.instance?.mode === 'details') {
|
||||
// Используем updateSensorDetails для обновления без сброса UI
|
||||
ErrorLazyLoadList.instance.updateSensorDetails(data);
|
||||
}
|
||||
});
|
||||
})
|
||||
.catch(console.error);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
29
assets/Scripts/ui/BackButton.ts
Normal file
@ -0,0 +1,29 @@
|
||||
// scripts/ui/BackButton.ts
|
||||
import { _decorator, Component, Button, director, SceneAsset } from 'cc';
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@ccclass('BackButton')
|
||||
export class BackButton extends Component {
|
||||
@property({ type: SceneAsset, tooltip: 'Сцена для возврата' })
|
||||
public targetScene: SceneAsset | null = null;
|
||||
|
||||
@property(Button)
|
||||
public button: Button | null = null;
|
||||
|
||||
onLoad() {
|
||||
this.button?.node?.on('click', this.onBackClick, this);
|
||||
}
|
||||
|
||||
onDestroy() {
|
||||
// защищённо отписываемся только если node ещё жив
|
||||
this.button?.node?.off('click', this.onBackClick, this);
|
||||
}
|
||||
|
||||
public onBackClick() {
|
||||
if (this.targetScene) {
|
||||
director.loadScene(this.targetScene.name);
|
||||
} else {
|
||||
console.warn('BackButton: не задан targetScene');
|
||||
}
|
||||
}
|
||||
}
|
||||
9
assets/Scripts/ui/BackButton.ts.meta
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "4.0.24",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "78f72efc-70db-4d6e-8145-afc88a049e3a",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
||||
@ -1,22 +1,26 @@
|
||||
import { _decorator, Component, Prefab, ScrollView, instantiate, UITransform, Node, Label } from 'cc';
|
||||
import { _decorator, Component, Prefab, ScrollView, instantiate, UITransform, Node, Label, NodePool, Vec3 } from 'cc';
|
||||
import { ErrorItemData } from '../stores/ErrorItemData';
|
||||
import { ErrorManager } from '../stores/ErrorManager';
|
||||
import { ErrorItemButton } from '../ux/ErrorItemButton';
|
||||
import { ErrorItemNamedButton } from '../ux/ErrorItemNamedButton';
|
||||
import { SensorDescription } from '../stores/SensorDescriptionField';
|
||||
import { SensorFieldItem } from './SensorFieldItem';
|
||||
import { MorphButtonWithButton } from '../ux/MorphButtonWithButton';
|
||||
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@ccclass("ErrorLazyLoadList")
|
||||
export class ErrorLazyLoadList extends Component {
|
||||
// Синглтон для доступа из других мест
|
||||
public static instance: ErrorLazyLoadList | null = null;
|
||||
|
||||
// Статические поля для сохранения состояния между сценами
|
||||
private static _savedMode: "errors" | "details" = "errors";
|
||||
private static _savedSensorDescription: SensorDescription | null = null;
|
||||
private static _savedFilteredData: ErrorItemData[] | null = null;
|
||||
|
||||
@property(Prefab)
|
||||
public errorItemPrefab: Prefab = null!;
|
||||
|
||||
// Префаб, который будет использоваться для отрисовки деталей датчика
|
||||
@property(Prefab)
|
||||
public sensorFieldItemPrefab: Prefab = null!;
|
||||
|
||||
@ -32,200 +36,612 @@ export class ErrorLazyLoadList extends Component {
|
||||
@property(Label)
|
||||
public header: Label = null!;
|
||||
|
||||
// Массив для хранения всех ошибок, полученных с API (плоский список)
|
||||
@property
|
||||
public visibleItemCount: number = 15; // Visible items buffer size
|
||||
|
||||
private _data: ErrorItemData[] = [];
|
||||
// Массив для хранения отфильтрованных данных (если фильтр активирован)
|
||||
private _filteredData: ErrorItemData[] | null = null;
|
||||
|
||||
// Дополнительно: режим отображения – ошибки или детали
|
||||
private _mode: "errors" | "details" = "errors";
|
||||
// Данные описания датчика (SensorDescription) для режима "details"
|
||||
private _sensorDescription: SensorDescription = null!;
|
||||
|
||||
private _sensorDescription: SensorDescription = null!;
|
||||
private _totalCount: number = 0;
|
||||
private _loadedCount: number = 0;
|
||||
private _itemHeight: number = 0;
|
||||
private _itemHeight: number = 0; // Including spacing
|
||||
private _content: Node = null!;
|
||||
private _contentUI: UITransform = null!;
|
||||
|
||||
/**
|
||||
* для получения сведений о текущем режиме отображения
|
||||
*/
|
||||
// Lazy-created NodePools
|
||||
private _errorItemPool: NodePool | null = null;
|
||||
private _namedErrorItemPool: NodePool | null = null;
|
||||
private _sensorFieldItemPools: Map<string, NodePool> = new Map(); // Пул для каждого датчика
|
||||
private _activeSensorNames: Set<string> = new Set(); // Отслеживаем активные датчики
|
||||
private _activeSensorFieldItems: Map<string, Set<Node>> = new Map(); // Отслеживаем активные элементы для каждого датчика
|
||||
|
||||
// Active items tracking
|
||||
private _activeItems: Node[] = [];
|
||||
private _activeItemsData: any[] = []; // Данные для отслеживания изменений
|
||||
private _firstVisibleIndex: number = 0;
|
||||
private _lastVisibleIndex: number = 0;
|
||||
|
||||
public get mode(): "errors" | "details" {
|
||||
return this._mode;
|
||||
}
|
||||
|
||||
|
||||
onLoad() {
|
||||
// Назначаем синглтон
|
||||
ErrorLazyLoadList.instance = this;
|
||||
|
||||
if (!this.scrollView.content) {
|
||||
console.error("ScrollView.content is null!");
|
||||
return;
|
||||
}
|
||||
|
||||
this._content = this.scrollView.content;
|
||||
this._contentUI = this._content.getComponent(UITransform)!;
|
||||
if (!this._contentUI) {
|
||||
console.error("Content node does not have UITransform component!");
|
||||
return;
|
||||
}
|
||||
|
||||
// Определяем высоту элемента через префаб (используем errorItemPrefab)
|
||||
// Calculate item height including spacing
|
||||
const tempNode: Node = instantiate(this.errorItemPrefab);
|
||||
const tempUI = tempNode.getComponent(UITransform);
|
||||
if (!tempUI) {
|
||||
console.error("Prefab missing UITransform component!");
|
||||
tempNode.destroy();
|
||||
return;
|
||||
}
|
||||
this._itemHeight = tempUI.height;
|
||||
this._itemHeight = tempUI!.height + this.spacing;
|
||||
tempNode.destroy();
|
||||
|
||||
// Изначально работаем в режиме "errors"
|
||||
this._mode = "errors";
|
||||
// Восстанавливаем сохраненное состояние
|
||||
this._mode = ErrorLazyLoadList._savedMode;
|
||||
if (ErrorLazyLoadList._savedSensorDescription) {
|
||||
this._sensorDescription = ErrorLazyLoadList._savedSensorDescription;
|
||||
}
|
||||
this._filteredData = ErrorLazyLoadList._savedFilteredData;
|
||||
|
||||
// Устанавливаем правильный заголовок
|
||||
if (this._mode === "details" && this._sensorDescription) {
|
||||
this.header.string = `Детали ${this._sensorDescription.sensorName}`;
|
||||
} else if (this._filteredData) {
|
||||
this.header.string = `Аварии на ${this._filteredData[0]?.sensorName || "неизвестно"}`;
|
||||
} else {
|
||||
this.header.string = "Список всех аварий";
|
||||
}
|
||||
|
||||
this.waitForErrorManager();
|
||||
this.scrollView.node.on('scrolling', this.onScrolling, this);
|
||||
}
|
||||
|
||||
onDestroy() {
|
||||
// Сохраняем текущее состояние перед уничтожением
|
||||
ErrorLazyLoadList._savedMode = this._mode;
|
||||
ErrorLazyLoadList._savedSensorDescription = this._sensorDescription;
|
||||
ErrorLazyLoadList._savedFilteredData = this._filteredData;
|
||||
|
||||
// Clean up event listeners
|
||||
this.scrollView?.node?.off('scrolling', this.onScrolling, this);
|
||||
|
||||
const errorManagerNode = (ErrorManager.instance as any)?.node;
|
||||
if (errorManagerNode) {
|
||||
errorManagerNode.off('errors-updated', this.onDataUpdated, this);
|
||||
}
|
||||
|
||||
// Clear pools and active items tracking
|
||||
this._errorItemPool?.clear();
|
||||
this._namedErrorItemPool?.clear();
|
||||
this._sensorFieldItemPools.forEach(pool => pool.clear());
|
||||
this._sensorFieldItemPools.clear();
|
||||
this._activeSensorNames.clear();
|
||||
this._activeSensorFieldItems.clear();
|
||||
|
||||
if (ErrorLazyLoadList.instance === this) {
|
||||
ErrorLazyLoadList.instance = null;
|
||||
}
|
||||
}
|
||||
|
||||
private getOrCreateErrorItemPool(): NodePool {
|
||||
if (!this._errorItemPool) {
|
||||
this._errorItemPool = new NodePool();
|
||||
for (let i = 0; i < this.visibleItemCount; i++) {
|
||||
this._errorItemPool.put(instantiate(this.errorItemPrefab));
|
||||
}
|
||||
}
|
||||
return this._errorItemPool;
|
||||
}
|
||||
|
||||
private getOrCreateNamedErrorItemPool(): NodePool {
|
||||
if (!this._namedErrorItemPool) {
|
||||
this._namedErrorItemPool = new NodePool();
|
||||
for (let i = 0; i < this.visibleItemCount; i++) {
|
||||
this._namedErrorItemPool.put(instantiate(this.errorItemNamedPrefab));
|
||||
}
|
||||
}
|
||||
return this._namedErrorItemPool;
|
||||
}
|
||||
|
||||
private getOrCreateSensorFieldItemPool(sensorName: string): NodePool {
|
||||
// Используем один общий пул для всех датчиков
|
||||
if (!this._sensorFieldItemPools.has('common')) {
|
||||
const pool = new NodePool();
|
||||
// Создаем пул достаточного размера
|
||||
const poolSize = Math.max(this.visibleItemCount, 20);
|
||||
for (let i = 0; i < poolSize; i++) {
|
||||
const item = instantiate(this.sensorFieldItemPrefab);
|
||||
// Сбрасываем состояние кнопок при создании
|
||||
this.resetSensorFieldItemState(item);
|
||||
pool.put(item);
|
||||
}
|
||||
this._sensorFieldItemPools.set('common', pool);
|
||||
}
|
||||
return this._sensorFieldItemPools.get('common')!;
|
||||
}
|
||||
|
||||
private resetSensorFieldItemState(item: Node) {
|
||||
// Сбрасываем состояние компонента SensorFieldItem
|
||||
const sensorFieldItem = item.getComponent(SensorFieldItem);
|
||||
if (sensorFieldItem) {
|
||||
sensorFieldItem.resetState();
|
||||
sensorFieldItem.reinitialize();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Полностью очищает все пулы и уничтожает элементы
|
||||
*/
|
||||
private clearAllPools() {
|
||||
console.log('[ErrorLazyLoadList] Clearing all pools');
|
||||
|
||||
// Очищаем и уничтожаем элементы в пулах
|
||||
if (this._errorItemPool) {
|
||||
this._errorItemPool.clear();
|
||||
this._errorItemPool = null;
|
||||
}
|
||||
|
||||
if (this._namedErrorItemPool) {
|
||||
this._namedErrorItemPool.clear();
|
||||
this._namedErrorItemPool = null;
|
||||
}
|
||||
|
||||
// Очищаем пулы датчиков
|
||||
this._sensorFieldItemPools.forEach(pool => {
|
||||
pool.clear();
|
||||
});
|
||||
this._sensorFieldItemPools.clear();
|
||||
|
||||
this._activeSensorNames.clear();
|
||||
this._activeSensorFieldItems.clear();
|
||||
}
|
||||
|
||||
private waitForErrorManager() {
|
||||
if (!ErrorManager.instance) {
|
||||
console.warn("ErrorManager.instance not found, retrying...");
|
||||
this.scheduleOnce(() => { this.waitForErrorManager(); }, 0.1);
|
||||
return;
|
||||
}
|
||||
ErrorManager.instance.node.on('errors-updated', this.onDataUpdated, this);
|
||||
this.onDataUpdated();
|
||||
|
||||
// ErrorManager extends Component, so it has a node property
|
||||
const errorManagerNode = (ErrorManager.instance as any).node;
|
||||
if (errorManagerNode && typeof errorManagerNode.on === 'function') {
|
||||
errorManagerNode.on('errors-updated', this.onDataUpdated, this);
|
||||
} else {
|
||||
console.warn("Could not subscribe to ErrorManager events - node not found");
|
||||
}
|
||||
|
||||
// Обновляем отображение в зависимости от режима
|
||||
if (this._mode === "errors") {
|
||||
this.onDataUpdated();
|
||||
} else if (this._mode === "details") {
|
||||
// Для режима details обновляем размеры и элементы
|
||||
this.updateVisibleItems(true); // Принудительно обновляем (включая высоту)
|
||||
}
|
||||
}
|
||||
|
||||
private onDataUpdated() {
|
||||
// Обновляем данные только в режиме ошибок
|
||||
if (this._mode !== "errors") return;
|
||||
|
||||
const apiErrors = ErrorManager.instance.getErrorList().apiErrors;
|
||||
const flattened: ErrorItemData[] = [];
|
||||
|
||||
for (const sensorName in apiErrors) {
|
||||
for (const err of apiErrors[sensorName]) {
|
||||
flattened.push({
|
||||
sensorName,
|
||||
alarmCode: err.alarmCode,
|
||||
description: err.description,
|
||||
timestamp: err.timestamp
|
||||
});
|
||||
flattened.push({ sensorName, alarmCode: err.alarmCode, description: err.description, timestamp: err.timestamp });
|
||||
}
|
||||
}
|
||||
|
||||
const oldDataLength = this._data.length;
|
||||
this._data = flattened;
|
||||
if (!this._filteredData) {
|
||||
|
||||
// Update both filtered and unfiltered views
|
||||
if (this._filteredData) {
|
||||
// If we have a filter, reapply it to the new data
|
||||
const currentFilter = this._filteredData.length > 0 ? this._filteredData[0].sensorName : '';
|
||||
if (currentFilter) {
|
||||
const oldFilteredLength = this._filteredData.length;
|
||||
this._filteredData = this._data.filter(item => item.sensorName === currentFilter);
|
||||
this._totalCount = this._filteredData.length;
|
||||
|
||||
// Принудительно обновляем высоту если изменилось количество отфильтрованных элементов
|
||||
if (oldFilteredLength !== this._filteredData.length) {
|
||||
this.updateVisibleItems(true);
|
||||
return;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
this._totalCount = this._data.length;
|
||||
this._loadedCount = 0;
|
||||
this._content.removeAllChildren();
|
||||
this.loadNextBatch(20);
|
||||
|
||||
// Принудительно обновляем высоту если изменилось общее количество элементов
|
||||
if (oldDataLength !== this._data.length) {
|
||||
this.updateVisibleItems(true);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// Просто обновляем видимые элементы без уничтожения
|
||||
this.updateVisibleItems();
|
||||
}
|
||||
|
||||
private onScrolling() {
|
||||
this.updateVisibleItems();
|
||||
}
|
||||
|
||||
private updateVisibleItems(forceUpdate: boolean = false) {
|
||||
const totalItems = this.getTotalItems();
|
||||
|
||||
// При принудительном обновлении всегда обновляем высоту контента
|
||||
// Также обновляем высоту если изменилось общее количество элементов
|
||||
if (forceUpdate || this._totalCount !== totalItems) {
|
||||
this._totalCount = totalItems;
|
||||
this.updateContentHeight();
|
||||
}
|
||||
|
||||
const scrollY = this.scrollView.getScrollOffset().y;
|
||||
const viewHeight = this.scrollView.node.getComponent(UITransform)!.height;
|
||||
|
||||
// Calculate the first visible item index based on scroll position
|
||||
const newFirstVisible = Math.floor(Math.max(0, scrollY) / this._itemHeight);
|
||||
|
||||
// Handle the case when there are no items
|
||||
if (totalItems <= 0) {
|
||||
this.hideAllItems();
|
||||
return;
|
||||
}
|
||||
|
||||
const newLastVisible = Math.min(
|
||||
newFirstVisible + Math.ceil(viewHeight / this._itemHeight) + 2,
|
||||
totalItems - 1
|
||||
);
|
||||
|
||||
// Always update if visible range changed OR if forced
|
||||
const needsUpdate = forceUpdate ||
|
||||
newFirstVisible !== this._firstVisibleIndex ||
|
||||
newLastVisible !== this._lastVisibleIndex;
|
||||
|
||||
if (!needsUpdate) {
|
||||
return;
|
||||
}
|
||||
|
||||
this._firstVisibleIndex = Math.max(0, newFirstVisible);
|
||||
this._lastVisibleIndex = Math.max(0, newLastVisible);
|
||||
|
||||
this.updatePoolItems();
|
||||
}
|
||||
|
||||
private hideAllItems() {
|
||||
// Return all active items to their pools
|
||||
// Создаем копию массива, так как returnItemToPool может изменять _activeItems
|
||||
const itemsToReturn = [...this._activeItems];
|
||||
for (const item of itemsToReturn) {
|
||||
this.returnItemToPool(item);
|
||||
}
|
||||
this._activeItems = [];
|
||||
this._activeItemsData = []; // Очищаем данные отслеживания
|
||||
}
|
||||
|
||||
private returnItemToPool(item: Node) {
|
||||
if (!item || !item.isValid) return;
|
||||
|
||||
item.active = false;
|
||||
item.removeFromParent();
|
||||
|
||||
// Determine which pool this item belongs to and return it
|
||||
if (item.getComponent(ErrorItemButton)) {
|
||||
this.getOrCreateErrorItemPool().put(item);
|
||||
} else if (item.getComponent(ErrorItemNamedButton)) {
|
||||
this.getOrCreateNamedErrorItemPool().put(item);
|
||||
} else if (item.getComponent(SensorFieldItem)) {
|
||||
// Для датчиков НЕ возвращаем в пул, а уничтожаем для гарантии чистого состояния
|
||||
console.log(`[ErrorLazyLoadList] Destroying SensorFieldItem instead of pooling`);
|
||||
|
||||
// Удаляем из активных элементов
|
||||
const sensorFieldItem = item.getComponent(SensorFieldItem);
|
||||
if (sensorFieldItem && sensorFieldItem.sensorName) {
|
||||
const activeItems = this._activeSensorFieldItems.get(sensorFieldItem.sensorName);
|
||||
if (activeItems) {
|
||||
activeItems.delete(item);
|
||||
console.log(`[ErrorLazyLoadList] Removed item from active items for ${sensorFieldItem.sensorName}, remaining: ${activeItems.size}`);
|
||||
}
|
||||
}
|
||||
|
||||
if (sensorFieldItem) {
|
||||
sensorFieldItem.resetState(); // Сбрасываем состояние перед уничтожением
|
||||
}
|
||||
item.destroy(); // Полностью уничтожаем элемент
|
||||
}
|
||||
}
|
||||
|
||||
loadNextBatch(batchSize: number) {
|
||||
let currentData: any[] = [];
|
||||
private updatePoolItems() {
|
||||
const currentData = this.getCurrentData();
|
||||
const itemsToShow = Math.min(
|
||||
this._lastVisibleIndex - this._firstVisibleIndex + 1,
|
||||
currentData.length - this._firstVisibleIndex
|
||||
);
|
||||
|
||||
// Определяем нужный пул для текущего режима
|
||||
let currentPool: NodePool;
|
||||
let expectedComponentType: string;
|
||||
|
||||
if (this._mode === "errors") {
|
||||
currentData = this._filteredData || this._data;
|
||||
if (this._filteredData) {
|
||||
currentPool = this.getOrCreateNamedErrorItemPool();
|
||||
expectedComponentType = "ErrorItemNamedButton";
|
||||
} else {
|
||||
currentPool = this.getOrCreateErrorItemPool();
|
||||
expectedComponentType = "ErrorItemButton";
|
||||
}
|
||||
} else if (this._mode === "details") {
|
||||
currentData = this._sensorDescription ? this._sensorDescription.fields : [];
|
||||
const sensorName = this._sensorDescription.sensorName;
|
||||
currentPool = this.getOrCreateSensorFieldItemPool(sensorName);
|
||||
expectedComponentType = "SensorFieldItem";
|
||||
this._activeSensorNames.add(sensorName);
|
||||
|
||||
// Инициализируем Set для активных элементов этого датчика, если его нет
|
||||
if (!this._activeSensorFieldItems.has(sensorName)) {
|
||||
this._activeSensorFieldItems.set(sensorName, new Set());
|
||||
}
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
if (this._loadedCount >= currentData.length) return;
|
||||
|
||||
const endIndex = Math.min(this._loadedCount + batchSize, currentData.length);
|
||||
for (let i = this._loadedCount; i < endIndex; i++) {
|
||||
let item: Node;
|
||||
if (this._mode === "errors") {
|
||||
if (this._filteredData) {
|
||||
item = instantiate(this.errorItemNamedPrefab);
|
||||
const errorItemNamedButton = item.getComponent("ErrorItemNamedButton") as unknown as ErrorItemNamedButton;
|
||||
if (errorItemNamedButton) {
|
||||
errorItemNamedButton.initialize(currentData[i]);
|
||||
} else {
|
||||
console.warn("Компонент ErrorItemNamedButton не найден на префабе.");
|
||||
}
|
||||
} else {
|
||||
item = instantiate(this.errorItemPrefab);
|
||||
const errorItemButton = item.getComponent("ErrorItemButton") as unknown as ErrorItemButton;
|
||||
if (errorItemButton) {
|
||||
errorItemButton.initialize(currentData[i]);
|
||||
} else {
|
||||
console.warn("Компонент ErrorItemButton не найден на префабе.");
|
||||
|
||||
// Проверяем совместимость существующих элементов с текущим режимом
|
||||
const incompatibleItems: Node[] = [];
|
||||
for (const item of this._activeItems) {
|
||||
const hasCorrectComponent = item.getComponent(expectedComponentType);
|
||||
if (!hasCorrectComponent) {
|
||||
incompatibleItems.push(item);
|
||||
}
|
||||
}
|
||||
|
||||
// Убираем несовместимые элементы
|
||||
for (const item of incompatibleItems) {
|
||||
const index = this._activeItems.indexOf(item);
|
||||
if (index !== -1) {
|
||||
this._activeItems.splice(index, 1);
|
||||
this._activeItemsData.splice(index, 1);
|
||||
this.returnItemToPool(item);
|
||||
}
|
||||
}
|
||||
|
||||
// Переиспользуем существующие элементы или создаем недостающие
|
||||
const targetActiveCount = Math.max(0, itemsToShow);
|
||||
|
||||
// Если элементов больше чем нужно - скрываем лишние
|
||||
while (this._activeItems.length > targetActiveCount) {
|
||||
const item = this._activeItems.pop()!;
|
||||
this._activeItemsData.pop();
|
||||
this.returnItemToPool(item);
|
||||
}
|
||||
|
||||
// Если элементов меньше чем нужно - добавляем новые
|
||||
while (this._activeItems.length < targetActiveCount) {
|
||||
let item: Node | null = null;
|
||||
|
||||
if (this._mode === "details") {
|
||||
// Для датчиков всегда создаем новые элементы
|
||||
item = this.createItemForCurrentMode();
|
||||
} else {
|
||||
// Для ошибок используем пул
|
||||
item = currentPool.get() || this.createItemForCurrentMode();
|
||||
}
|
||||
|
||||
if (!item) break;
|
||||
|
||||
this._content.addChild(item);
|
||||
item.active = true;
|
||||
this._activeItems.push(item);
|
||||
this._activeItemsData.push(null); // Placeholder для новых элементов
|
||||
|
||||
// Если это элемент датчика, добавляем его в активные элементы
|
||||
if (this._mode === "details") {
|
||||
const sensorName = this._sensorDescription.sensorName;
|
||||
let activeItems = this._activeSensorFieldItems.get(sensorName);
|
||||
if (!activeItems) {
|
||||
activeItems = new Set();
|
||||
this._activeSensorFieldItems.set(sensorName, activeItems);
|
||||
}
|
||||
activeItems.add(item);
|
||||
console.log(`[ErrorLazyLoadList] Added SensorFieldItem to active items for ${sensorName}, total: ${activeItems.size}`);
|
||||
}
|
||||
}
|
||||
|
||||
// Обновляем данные в существующих элементах ТОЛЬКО если данные изменились
|
||||
for (let i = 0; i < this._activeItems.length; i++) {
|
||||
const dataIndex = this._firstVisibleIndex + i;
|
||||
const item = this._activeItems[i];
|
||||
|
||||
if (dataIndex >= 0 && dataIndex < currentData.length) {
|
||||
const newData = currentData[dataIndex];
|
||||
const oldData = this._activeItemsData[i];
|
||||
|
||||
// Для новых элементов датчиков всегда обновляем данные
|
||||
// Для остальных - сравниваем данные и обновляем только если изменились
|
||||
const isNewSensorItem = this._mode === "details" && !oldData;
|
||||
|
||||
// Для датчиков проверяем изменения в значениях полей более детально
|
||||
let dataChanged = false;
|
||||
if (this._mode === "details" && oldData && newData) {
|
||||
dataChanged = oldData.name !== newData.name ||
|
||||
oldData.value !== newData.value ||
|
||||
oldData.unit !== newData.unit ||
|
||||
oldData.description !== newData.description;
|
||||
}
|
||||
|
||||
const needsUpdate = isNewSensorItem || !oldData ||
|
||||
dataChanged ||
|
||||
JSON.stringify(oldData) !== JSON.stringify(newData) ||
|
||||
dataIndex !== this._activeItemsData[i]?.lastDataIndex;
|
||||
|
||||
if (needsUpdate) {
|
||||
// Обновляем данные компонента
|
||||
const component = this.getComponentForCurrentMode(item);
|
||||
try {
|
||||
switch (this._mode) {
|
||||
case "errors":
|
||||
if (component && 'initialize' in component && typeof component.initialize === 'function') {
|
||||
(component as ErrorItemButton | ErrorItemNamedButton).initialize(newData);
|
||||
}
|
||||
break;
|
||||
case "details":
|
||||
if (component && 'setData' in component && typeof component.setData === 'function') {
|
||||
console.log(`[ErrorLazyLoadList] Updating SensorFieldItem data: ${newData.name}`);
|
||||
// Для новых элементов используем setData (полная инициализация)
|
||||
// Для существующих элементов используем updateData (сохранение состояния UI)
|
||||
if (isNewSensorItem) {
|
||||
(component as SensorFieldItem).setData(newData);
|
||||
} else {
|
||||
(component as SensorFieldItem).updateData(newData);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
// Сохраняем новые данные для будущих сравнений
|
||||
this._activeItemsData[i] = { ...newData, lastDataIndex: dataIndex };
|
||||
} catch (e) {
|
||||
console.warn("Error updating item component:", e);
|
||||
}
|
||||
}
|
||||
} else if (this._mode === "details") {
|
||||
item = instantiate(this.sensorFieldItemPrefab);
|
||||
const sensorFieldItem = item.getComponent(SensorFieldItem);
|
||||
if (sensorFieldItem) {
|
||||
sensorFieldItem.setData(currentData[i]);
|
||||
} else {
|
||||
console.warn("Компонент SensorFieldItem не найден на префабе.");
|
||||
|
||||
// Позиционируем элемент (это нужно делать всегда для виртуализации)
|
||||
item.setPosition(0, -(dataIndex * this._itemHeight + this._itemHeight / 2 - this.spacing / 2), 0);
|
||||
|
||||
// Показываем элемент только если он еще не виден
|
||||
if (!item.active) {
|
||||
item.active = true;
|
||||
}
|
||||
} else {
|
||||
console.error("Неизвестный режим: " + this._mode);
|
||||
continue;
|
||||
// Скрываем элементы вне диапазона
|
||||
if (item.active) {
|
||||
item.active = false;
|
||||
}
|
||||
this._activeItemsData[i] = null;
|
||||
}
|
||||
// Пока просто добавляем элемент, без позиционирования
|
||||
this._content.addChild(item);
|
||||
}
|
||||
this._loadedCount = endIndex;
|
||||
}
|
||||
|
||||
private createItemForCurrentMode(): Node | null {
|
||||
if (this._mode === "errors") {
|
||||
if (this._filteredData) {
|
||||
return instantiate(this.errorItemNamedPrefab);
|
||||
} else {
|
||||
return instantiate(this.errorItemPrefab);
|
||||
}
|
||||
} else if (this._mode === "details") {
|
||||
// Для датчиков всегда создаем новые элементы для гарантии чистого состояния
|
||||
if (this._sensorDescription && this._sensorDescription.sensorName) {
|
||||
console.log(`[ErrorLazyLoadList] Creating fresh SensorFieldItem for ${this._sensorDescription.sensorName}`);
|
||||
const item = instantiate(this.sensorFieldItemPrefab);
|
||||
// Сбрасываем состояние нового элемента
|
||||
this.resetSensorFieldItemState(item);
|
||||
return item;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private getComponentForCurrentMode(item: Node): Component | null {
|
||||
if (this._mode === "errors") {
|
||||
if (this._filteredData) {
|
||||
return item.getComponent(ErrorItemNamedButton);
|
||||
} else {
|
||||
return item.getComponent(ErrorItemButton);
|
||||
}
|
||||
} else if (this._mode === "details") {
|
||||
return item.getComponent(SensorFieldItem);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private getCurrentData(): any[] {
|
||||
if (this._mode === "errors") {
|
||||
return this._filteredData || this._data;
|
||||
} else if (this._mode === "details") {
|
||||
return this._sensorDescription?.fields || [];
|
||||
}
|
||||
return [];
|
||||
}
|
||||
|
||||
private getTotalItems(): number {
|
||||
return this.getCurrentData().length;
|
||||
}
|
||||
|
||||
private updateContentHeight() {
|
||||
const totalItems = this.getTotalItems();
|
||||
const newHeight = totalItems * this._itemHeight;
|
||||
const oldHeight = this._contentUI.height;
|
||||
|
||||
// После добавления новой партии элементов, переспозиционируем всех дочерних
|
||||
this.scheduleOnce(() => {
|
||||
this.repositionChildren();
|
||||
if (oldHeight !== newHeight) {
|
||||
console.log(`[ErrorLazyLoadList] Updating content height: ${oldHeight} -> ${newHeight} (items: ${totalItems})`);
|
||||
this._contentUI.height = newHeight;
|
||||
}
|
||||
}
|
||||
|
||||
private preserveScrollPosition(callback: () => void) {
|
||||
const oldOffset = this.scrollView.getScrollOffset();
|
||||
callback();
|
||||
this.scheduleOnce(() => {
|
||||
this.scrollView.scrollToOffset(oldOffset, 0.1);
|
||||
}, 0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
private repositionChildren() {
|
||||
let cumulativeHeight = 0;
|
||||
// Проходим по всем дочерним элементам контейнера
|
||||
for (let i = 0; i < this._content.children.length; i++) {
|
||||
const child = this._content.children[i];
|
||||
// Получаем актуальную высоту через UITransform
|
||||
const childHeight = child.getComponent(UITransform)?.height || 0;
|
||||
// Вычисляем позицию для этого элемента так, чтобы его центр был ниже предыдущего элемента
|
||||
child.setPosition(0, - (cumulativeHeight + childHeight / 2), 0);
|
||||
// Добавляем к накопленной высоте высоту элемента плюс spacing
|
||||
cumulativeHeight += childHeight + this.spacing;
|
||||
}
|
||||
// Обновляем высоту контейнера, чтобы ScrollView корректно показывал содержимое
|
||||
this._contentUI.height = cumulativeHeight;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* В
|
||||
/**
|
||||
* Фильтрует список ошибок по имени оборудования.
|
||||
* @param sensorName имя оборудования, по которому необходимо отфильтровать список
|
||||
*/
|
||||
public filterBySensor(sensorName: string) {
|
||||
this._mode = "errors";
|
||||
this.header.string = `Аварии на ${sensorName}`;
|
||||
this._filteredData = this._data.filter(item => item.sensorName === sensorName);
|
||||
this._totalCount = this._filteredData.length;
|
||||
this._loadedCount = 0;
|
||||
this._content.removeAllChildren();
|
||||
this.loadNextBatch(20);
|
||||
// Проверяем, действительно ли меняется фильтр
|
||||
const isNewFilter = !this._filteredData ||
|
||||
this._filteredData.length === 0 ||
|
||||
this._filteredData[0].sensorName !== sensorName;
|
||||
|
||||
this.preserveScrollPosition(() => {
|
||||
// Уничтожаем элементы и очищаем пулы если меняется фильтр
|
||||
if (isNewFilter) {
|
||||
this.hideAllItems();
|
||||
this.clearAllPools(); // Полностью очищаем пулы
|
||||
}
|
||||
|
||||
this._mode = "errors";
|
||||
this.header.string = `Аварии на ${sensorName}`;
|
||||
this._filteredData = this._data.filter(item => item.sensorName === sensorName);
|
||||
this._totalCount = this._filteredData.length;
|
||||
|
||||
// Принудительно обновляем данные
|
||||
this.updateVisibleItems(true);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Сбрасывает фильтр и возвращает отображение полного списка ошибок.
|
||||
*/
|
||||
public resetFilter() {
|
||||
this.header.string = "Список всех аварий";
|
||||
this._mode = "errors";
|
||||
this._filteredData = null;
|
||||
this._totalCount = this._data.length;
|
||||
this._loadedCount = 0;
|
||||
this._content.removeAllChildren();
|
||||
this.loadNextBatch(20);
|
||||
// Проверяем, действительно ли есть активный фильтр
|
||||
const hasActiveFilter = this._filteredData !== null;
|
||||
|
||||
this.preserveScrollPosition(() => {
|
||||
// Уничтожаем элементы и очищаем пулы если был активный фильтр
|
||||
if (hasActiveFilter) {
|
||||
this.hideAllItems();
|
||||
this.clearAllPools(); // Полностью очищаем пулы
|
||||
}
|
||||
|
||||
this.header.string = "Список всех аварий";
|
||||
this._mode = "errors";
|
||||
this._filteredData = null;
|
||||
this._totalCount = this._data.length;
|
||||
|
||||
// Принудительно обновляем данные
|
||||
this.updateVisibleItems(true);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@ -233,27 +649,131 @@ export class ErrorLazyLoadList extends Component {
|
||||
* @param data Объект с деталями датчика.
|
||||
*/
|
||||
public showSensorDetails(data: { sensorName: string, fields: any[] }) {
|
||||
this._mode = "details";
|
||||
this.header.string = `Детали ${data.sensorName}`;
|
||||
// Проверяем, действительно ли меняется датчик или режим
|
||||
const isNewSensor = !this._sensorDescription || this._sensorDescription.sensorName !== data.sensorName;
|
||||
const isModeChange = this._mode !== "details";
|
||||
|
||||
this.preserveScrollPosition(() => {
|
||||
// Уничтожаем элементы и очищаем пулы если меняется датчик или режим
|
||||
if (isNewSensor || isModeChange) {
|
||||
this.hideAllItems();
|
||||
this.clearAllPools(); // Полностью очищаем все пулы
|
||||
}
|
||||
|
||||
this._mode = "details";
|
||||
this.header.string = `Детали ${data.sensorName}`;
|
||||
this._sensorDescription = {
|
||||
sensorName: data.sensorName,
|
||||
fields: data.fields || []
|
||||
};
|
||||
|
||||
// Принудительно обновляем данные
|
||||
this.updateVisibleItems(true);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Обновляет данные датчика без сброса UI состояния (для периодических обновлений).
|
||||
* @param data Объект с деталями датчика.
|
||||
*/
|
||||
public updateSensorDetails(data: { sensorName: string, fields: any[] }) {
|
||||
// Обновляем только если мы в режиме details и это тот же датчик
|
||||
if (this._mode !== "details" || !this._sensorDescription ||
|
||||
this._sensorDescription.sensorName !== data.sensorName) {
|
||||
return;
|
||||
}
|
||||
|
||||
console.log(`[ErrorLazyLoadList] updateSensorDetails: ${data.sensorName}, fields count: ${data.fields?.length || 0}`);
|
||||
|
||||
// Сохраняем старое количество полей для сравнения
|
||||
const oldFieldsCount = this._sensorDescription.fields?.length || 0;
|
||||
const newFieldsCount = data.fields?.length || 0;
|
||||
|
||||
// Обновляем данные
|
||||
this._sensorDescription = {
|
||||
sensorName: data.sensorName,
|
||||
fields: data.fields
|
||||
fields: data.fields || []
|
||||
};
|
||||
this._loadedCount = 0;
|
||||
this._content.removeAllChildren();
|
||||
this.loadNextBatch(20);
|
||||
|
||||
// Принудительно сбрасываем данные отслеживания для принудительного обновления
|
||||
this._activeItemsData = this._activeItemsData.map(() => null);
|
||||
|
||||
// Принудительно обновляем все активные элементы датчика
|
||||
this.forceUpdateActiveSensorItems(data.sensorName, data.fields);
|
||||
|
||||
// Если изменилось количество полей, принудительно обновляем высоту контента
|
||||
if (oldFieldsCount !== newFieldsCount) {
|
||||
this.updateVisibleItems(true);
|
||||
} else {
|
||||
// Обновляем видимые элементы без принудительного обновления высоты
|
||||
this.updateVisibleItems(false);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Принудительно обновляет все активные элементы конкретного датчика
|
||||
*/
|
||||
private forceUpdateActiveSensorItems(sensorName: string, fields: any[]) {
|
||||
const activeItems = this._activeSensorFieldItems.get(sensorName);
|
||||
if (!activeItems || activeItems.size === 0) {
|
||||
console.log(`[ErrorLazyLoadList] No active items found for sensor ${sensorName}`);
|
||||
return;
|
||||
}
|
||||
|
||||
console.log(`[ErrorLazyLoadList] Force updating ${activeItems.size} active items for sensor ${sensorName}`);
|
||||
|
||||
// Обновляем каждый активный элемент
|
||||
let itemIndex = 0;
|
||||
for (const item of activeItems) {
|
||||
if (!item.isValid || !item.active) {
|
||||
continue;
|
||||
}
|
||||
|
||||
const component = item.getComponent(SensorFieldItem);
|
||||
if (component && itemIndex < fields.length) {
|
||||
const fieldData = fields[itemIndex];
|
||||
console.log(`[ErrorLazyLoadList] Force updating item ${itemIndex}: ${fieldData.name} = ${fieldData.value}`);
|
||||
// Используем updateData() вместо setData() для сохранения состояния UI
|
||||
component.updateData(fieldData);
|
||||
itemIndex++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Возвращает в режим отображения ошибок (например, при переключении вкладок).
|
||||
*/
|
||||
public showErrors() {
|
||||
this._mode = "errors";
|
||||
this.header.string = "Список всех аварий";
|
||||
this._filteredData = null;
|
||||
this._totalCount = this._data.length;
|
||||
this._loadedCount = 0;
|
||||
this._content.removeAllChildren();
|
||||
this.loadNextBatch(20);
|
||||
// Проверяем, действительно ли меняется режим
|
||||
const isModeChange = this._mode !== "errors";
|
||||
|
||||
this.preserveScrollPosition(() => {
|
||||
// Уничтожаем элементы и очищаем пулы если меняется режим
|
||||
if (isModeChange) {
|
||||
this.hideAllItems();
|
||||
this.clearAllPools(); // Полностью очищаем все пулы
|
||||
}
|
||||
|
||||
this._mode = "errors";
|
||||
this.header.string = "Список всех аварий";
|
||||
this._filteredData = null;
|
||||
this._totalCount = this._data.length;
|
||||
|
||||
// Принудительно обновляем данные
|
||||
this.updateVisibleItems(true);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
private updateSensorFieldItem(item: Node, data: any, dataIndex: number) {
|
||||
const component = item.getComponent(SensorFieldItem);
|
||||
if (component) {
|
||||
component.setData(data);
|
||||
}
|
||||
}
|
||||
|
||||
private cleanupUnusedSensorPools() {
|
||||
// Теперь у нас один общий пул, поэтому просто очищаем неиспользуемые ссылки
|
||||
this._activeSensorNames.clear();
|
||||
this._activeSensorFieldItems.clear();
|
||||
}
|
||||
}
|
||||
@ -1,4 +1,5 @@
|
||||
import { _decorator, Component, Node, tween, Vec3 } from 'cc';
|
||||
import { switchWalls } from '../ux/switchWalls';
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@ccclass('ReturnCameraButtonController')
|
||||
@ -32,6 +33,8 @@ export class ReturnCameraButtonController extends Component {
|
||||
// Исходная позиция кнопки
|
||||
private originalButtonPos: Vec3 = new Vec3();
|
||||
|
||||
private wallSwtich: switchWalls = null!;
|
||||
|
||||
start() {
|
||||
// Сохраняем исходную позицию кнопки, как её позицию при отображении (например, в инспекторе)
|
||||
this.originalButtonPos = this.returnCameraButton.getPosition().clone();
|
||||
@ -43,15 +46,17 @@ export class ReturnCameraButtonController extends Component {
|
||||
|
||||
// Подписываемся на событие "moved", эмитируемое персонажем при его движении
|
||||
this.character.on('moved', this.onCharacterMoved, this);
|
||||
this.wallSwtich = switchWalls.getInstance();
|
||||
}
|
||||
|
||||
|
||||
// Обработчик события движения персонажа
|
||||
private onCharacterMoved() {
|
||||
const currentPos = this.character.getPosition();
|
||||
const distance = currentPos.clone().subtract(this.originalCharacterPos).length();
|
||||
if (distance >= this.moveThreshold) {
|
||||
// Если персонаж сместился достаточно, запускаем анимацию показа кнопки
|
||||
// Скрываем стены явно (до этого они были видимы)
|
||||
this.wallSwtich.hideWalls();
|
||||
// Запускаем анимацию показа кнопки
|
||||
this.resetPosition();
|
||||
}
|
||||
}
|
||||
@ -74,4 +79,11 @@ export class ReturnCameraButtonController extends Component {
|
||||
})
|
||||
.start();
|
||||
}
|
||||
|
||||
// Метод, назначаемый через UI click event на кнопке.
|
||||
// При повторном клике отображаются стены, а кнопка скрывается.
|
||||
public onReturnButtonClick() {
|
||||
this.wallSwtich.showWalls();
|
||||
this.hideButton();
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
import { _decorator, Component, Label, Color } from 'cc';
|
||||
import { _decorator, Component, Label, Node } from 'cc'; // <-- добавили Node
|
||||
import { SensorDescriptionField } from '../stores/SensorDescriptionField';
|
||||
import { MorphButtonWithButton } from '../ux/MorphButtonWithButton';
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@ccclass('SensorFieldItem')
|
||||
@ -15,28 +16,226 @@ export class SensorFieldItem extends Component {
|
||||
|
||||
@property(Label)
|
||||
public descriptionLabel: Label | null = null;
|
||||
|
||||
|
||||
/** Нода-контейнер для анимации (спрайт + Label) */
|
||||
@property({ type: Node })
|
||||
public descriptionContainer: Node | null = null;
|
||||
|
||||
/** Нода Morph, которую нужно скрывать при наличии описания */
|
||||
@property({ type: Node })
|
||||
public Morph: Node | null = null;
|
||||
|
||||
/** Имя датчика для корректной работы с пулами */
|
||||
public sensorName: string = "";
|
||||
|
||||
private morphButton: MorphButtonWithButton | null = null;
|
||||
private buttonId: string = "";
|
||||
private hasDescription: boolean = false;
|
||||
|
||||
protected onLoad(): void {
|
||||
console.log(`[SensorFieldItem] onLoad: ${this.node.name} (${this.node.uuid})`);
|
||||
// Сразу прячем контейнер, теперь active доступен
|
||||
if (this.descriptionContainer) {
|
||||
this.descriptionContainer.active = false;
|
||||
}
|
||||
|
||||
// Находим кнопку Morph
|
||||
if (this.Morph) {
|
||||
this.morphButton = this.Morph.getComponent(MorphButtonWithButton);
|
||||
if (this.morphButton) {
|
||||
this.buttonId = this.morphButton.getButtonId();
|
||||
console.log(`[SensorFieldItem] Found MorphButton: ${this.Morph.name} (${this.Morph.uuid}), buttonId: ${this.buttonId}`);
|
||||
|
||||
// Подписываемся на изменение состояния кнопки
|
||||
const button = this.Morph.getComponent('cc.Button') as any;
|
||||
if (button) {
|
||||
button.node.on('click', this.onMorphButtonClick, this);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected onDestroy(): void {
|
||||
// Отписываемся от событий при уничтожении
|
||||
if (this.Morph && this.Morph.isValid) {
|
||||
try {
|
||||
const button = this.Morph.getComponent('cc.Button') as any;
|
||||
if (button && button.node && button.node.isValid) {
|
||||
button.node.off('click', this.onMorphButtonClick, this);
|
||||
}
|
||||
} catch (e) {
|
||||
// Игнорируем ошибки при уничтожении
|
||||
console.warn('[SensorFieldItem] Error in onDestroy:', e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private onMorphButtonClick(): void {
|
||||
if (!this.hasDescription || !this.morphButton) return;
|
||||
|
||||
// Ждем завершения анимации кнопки (2 кадра по 0.055 = 0.11 + небольшой запас)
|
||||
this.scheduleOnce(() => {
|
||||
this.syncDescriptionWithButton();
|
||||
}, 0.15);
|
||||
}
|
||||
|
||||
/**
|
||||
* Синхронизирует видимость описания с состоянием кнопки
|
||||
*/
|
||||
private syncDescriptionWithButton(): void {
|
||||
if (!this.morphButton || !this.hasDescription) return;
|
||||
|
||||
const isShowingDescription = !this.morphButton.getIsQuestion();
|
||||
console.log(`[SensorFieldItem] syncDescriptionWithButton: button state = ${this.morphButton.getIsQuestion() ? 'question' : 'cross'}, showing description = ${isShowingDescription}`);
|
||||
|
||||
if (this.descriptionContainer) {
|
||||
this.descriptionContainer.active = isShowingDescription;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Установить данные для отображения поля датчика.
|
||||
* @param field Объект поля датчика (name, value, unit, description)
|
||||
*/
|
||||
public setData(field: SensorDescriptionField): void {
|
||||
if (this.nameLabel) this.nameLabel.string = field.name;
|
||||
this.setDataInternal(field, true); // Полная инициализация с сбросом состояния
|
||||
}
|
||||
|
||||
/**
|
||||
* Обновить только данные без сброса состояния UI (для обновлений в реальном времени).
|
||||
* @param field Объект поля датчика (name, value, unit, description)
|
||||
*/
|
||||
public updateData(field: SensorDescriptionField): void {
|
||||
this.setDataInternal(field, false); // Обновление без сброса состояния
|
||||
}
|
||||
|
||||
/**
|
||||
* Внутренний метод для установки данных с возможностью сохранения состояния UI
|
||||
* @param field Объект поля датчика
|
||||
* @param resetUIState Нужно ли сбрасывать состояние UI (кнопки и описания)
|
||||
*/
|
||||
private setDataInternal(field: SensorDescriptionField, resetUIState: boolean): void {
|
||||
console.log(`[SensorFieldItem] ${resetUIState ? 'setData' : 'updateData'}: ${this.node.name} (${this.node.uuid}), field: ${field.name}, buttonId: ${this.buttonId}`);
|
||||
|
||||
// Обновляем основные данные (это всегда нужно делать)
|
||||
if (this.nameLabel) this.nameLabel.string = field.name;
|
||||
if (this.valueLabel) this.valueLabel.string = String(field.value);
|
||||
if (this.unitLabel) this.unitLabel.string = field.unit;
|
||||
|
||||
// Отображение описания (мелким серым текстом, если есть)
|
||||
if (this.unitLabel) this.unitLabel.string = field.unit ?? "????";
|
||||
|
||||
this.hasDescription = !!field.description?.trim();
|
||||
console.log(`[SensorFieldItem] Has description: ${this.hasDescription}, resetUIState: ${resetUIState}, buttonId: ${this.buttonId}`);
|
||||
|
||||
// Работаем с описанием
|
||||
if (this.descriptionLabel) {
|
||||
if (field.description && field.description.trim() !== "") {
|
||||
this.descriptionLabel.string = field.description;
|
||||
// Применяем стили: серый цвет, мелкий шрифт
|
||||
|
||||
this.descriptionLabel.node.active = true;
|
||||
} else {
|
||||
// Если описания нет, скрываем или очищаем поле описания
|
||||
this.descriptionLabel.string = this.hasDescription ? field.description! : "";
|
||||
}
|
||||
|
||||
this.descriptionLabel.node.active = false;
|
||||
if (resetUIState) {
|
||||
// Полная инициализация - сбрасываем состояние UI
|
||||
// Всегда начинаем с скрытого описания (кнопка в состоянии question)
|
||||
if (this.descriptionContainer) {
|
||||
this.descriptionContainer.active = false;
|
||||
}
|
||||
|
||||
// Morph: показываем кнопку только при наличии описания
|
||||
if (this.Morph) {
|
||||
this.Morph.active = this.hasDescription;
|
||||
// Убеждаемся, что кнопка в состоянии question при первом показе
|
||||
if (this.morphButton && this.morphButton.getIsQuestion() === false) {
|
||||
console.log(`[SensorFieldItem] Fully reinitializing button to question state for: ${this.Morph.name} (${this.Morph.uuid}), buttonId: ${this.buttonId}`);
|
||||
this.morphButton.fullReinitialize();
|
||||
this.buttonId = this.morphButton.getButtonId(); // Обновляем buttonId после полной переинициализации
|
||||
}
|
||||
|
||||
// Принудительно синхронизируем состояние после небольшой задержки
|
||||
this.scheduleOnce(() => {
|
||||
this.syncDescriptionWithButton();
|
||||
}, 0.05);
|
||||
}
|
||||
} else {
|
||||
// Обновление данных - сохраняем текущее состояние UI
|
||||
if (this.Morph) {
|
||||
// Показываем/скрываем кнопку в зависимости от наличия описания
|
||||
this.Morph.active = this.hasDescription;
|
||||
|
||||
// НЕ сбрасываем состояние кнопки, сохраняем текущее
|
||||
// Только синхронизируем видимость описания с текущим состоянием кнопки
|
||||
if (this.hasDescription) {
|
||||
this.scheduleOnce(() => {
|
||||
this.syncDescriptionWithButton();
|
||||
}, 0.05);
|
||||
} else {
|
||||
// Если описания нет, скрываем контейнер
|
||||
if (this.descriptionContainer) {
|
||||
this.descriptionContainer.active = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Сбросить состояние компонента к начальному
|
||||
*/
|
||||
public resetState(): void {
|
||||
console.log(`[SensorFieldItem] resetState: ${this.node.name} (${this.node.uuid}), buttonId: ${this.buttonId}`);
|
||||
|
||||
// Сбрасываем все данные
|
||||
this.hasDescription = false;
|
||||
this.sensorName = "";
|
||||
|
||||
// Сбрасываем текст в лейблах
|
||||
if (this.nameLabel) this.nameLabel.string = "";
|
||||
if (this.valueLabel) this.valueLabel.string = "";
|
||||
if (this.unitLabel) this.unitLabel.string = "";
|
||||
if (this.descriptionLabel) this.descriptionLabel.string = "";
|
||||
|
||||
// Скрываем контейнер описания
|
||||
if (this.descriptionContainer) {
|
||||
this.descriptionContainer.active = false;
|
||||
}
|
||||
|
||||
// Скрываем кнопку и сбрасываем её состояние
|
||||
if (this.Morph) {
|
||||
this.Morph.active = false;
|
||||
if (this.morphButton) {
|
||||
console.log(`[SensorFieldItem] Fully reinitializing MorphButton state in resetState: ${this.Morph.name} (${this.Morph.uuid}), buttonId: ${this.buttonId}`);
|
||||
this.morphButton.fullReinitialize();
|
||||
this.buttonId = this.morphButton.getButtonId(); // Обновляем buttonId после полной переинициализации
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Переинициализация компонента после получения из пула
|
||||
*/
|
||||
public reinitialize(): void {
|
||||
console.log(`[SensorFieldItem] reinitialize start: ${this.node.name}`);
|
||||
|
||||
// Переинициализируем ссылку на кнопку, так как она могла измениться
|
||||
if (this.Morph) {
|
||||
// Сначала очищаем старую ссылку
|
||||
this.morphButton = null;
|
||||
|
||||
// Получаем компонент заново
|
||||
this.morphButton = this.Morph.getComponent(MorphButtonWithButton);
|
||||
if (this.morphButton) {
|
||||
console.log(`[SensorFieldItem] Before fullReinitialize - button state: ${this.morphButton.getIsQuestion() ? 'question' : 'cross'}`);
|
||||
|
||||
// Используем полную переинициализацию вместо простого resetState
|
||||
this.morphButton.fullReinitialize();
|
||||
this.buttonId = this.morphButton.getButtonId();
|
||||
|
||||
console.log(`[SensorFieldItem] After fullReinitialize - button state: ${this.morphButton.getIsQuestion() ? 'question' : 'cross'}`);
|
||||
console.log(`[SensorFieldItem] Fully reinitialized MorphButton: ${this.Morph.name} (${this.Morph.uuid}), buttonId: ${this.buttonId}`);
|
||||
} else {
|
||||
console.warn(`[SensorFieldItem] MorphButton component not found on ${this.Morph.name}`);
|
||||
}
|
||||
}
|
||||
|
||||
// Гарантируем, что описание скрыто
|
||||
if (this.descriptionContainer) {
|
||||
this.descriptionContainer.active = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { _decorator, Component, Prefab, ScrollView, instantiate, UITransform, Node, MeshRenderer } from 'cc';
|
||||
import { _decorator, Component, Prefab, ScrollView, instantiate, UITransform, Node, MeshRenderer, NodePool } from 'cc';
|
||||
import { ItemButton } from '../ux/ItemButton';
|
||||
import { apiSensors } from '../stores/apiSensors';
|
||||
import { EquipmentManager } from '../stores/EquipmentManager';
|
||||
@ -13,19 +13,29 @@ export class LazyLoadList extends Component {
|
||||
@property(ScrollView)
|
||||
public scrollView: ScrollView = null!;
|
||||
|
||||
// Нода, содержащая оборудование (для фильтрации по именам)
|
||||
@property(Node)
|
||||
public equipmentNode: Node = null!;
|
||||
|
||||
@property
|
||||
public spacing: number = 10;
|
||||
|
||||
@property
|
||||
public visibleItemCount: number = 15; // Visible items buffer size
|
||||
|
||||
private _data: apiSensors[] = [];
|
||||
private _totalCount: number = 0;
|
||||
private _loadedCount: number = 0;
|
||||
private _itemHeight: number = 0;
|
||||
private _itemHeight: number = 0; // Including spacing
|
||||
private _content: Node = null!;
|
||||
private _contentUI: UITransform = null!;
|
||||
|
||||
// Pool for item reuse
|
||||
private _itemPool: NodePool | null = null;
|
||||
|
||||
// Active items tracking
|
||||
private _activeItems: Node[] = [];
|
||||
private _activeItemsData: any[] = []; // Данные для отслеживания изменений
|
||||
private _firstVisibleIndex: number = 0;
|
||||
private _lastVisibleIndex: number = 0;
|
||||
|
||||
onLoad() {
|
||||
if (!this.scrollView.content) {
|
||||
@ -34,12 +44,8 @@ export class LazyLoadList extends Component {
|
||||
}
|
||||
this._content = this.scrollView.content;
|
||||
this._contentUI = this._content.getComponent(UITransform)!;
|
||||
if (!this._contentUI) {
|
||||
console.error("Узел content не имеет компонента UITransform!");
|
||||
return;
|
||||
}
|
||||
|
||||
// Определяем высоту элемента через префаб
|
||||
|
||||
// Calculate item height including spacing
|
||||
const tempNode: Node = instantiate(this.itemPrefab);
|
||||
const tempUI = tempNode.getComponent(UITransform);
|
||||
if (!tempUI) {
|
||||
@ -47,24 +53,37 @@ export class LazyLoadList extends Component {
|
||||
tempNode.destroy();
|
||||
return;
|
||||
}
|
||||
this._itemHeight = tempUI.height;
|
||||
this._itemHeight = tempUI.height + this.spacing;
|
||||
tempNode.destroy();
|
||||
|
||||
// Ожидаем появления EquipmentManager.instance и загрузки данных
|
||||
this.waitForEquipmentManager();
|
||||
|
||||
// Добавляем обработчик прокрутки для виртуализации
|
||||
this.scrollView.node.on('scrolling', this.onScrolling, this);
|
||||
}
|
||||
|
||||
private getOrCreateItemPool(): NodePool {
|
||||
if (!this._itemPool) {
|
||||
this._itemPool = new NodePool();
|
||||
for (let i = 0; i < this.visibleItemCount; i++) {
|
||||
this._itemPool.put(instantiate(this.itemPrefab));
|
||||
}
|
||||
}
|
||||
return this._itemPool;
|
||||
}
|
||||
|
||||
private onScrolling() {
|
||||
this.updateVisibleItems();
|
||||
}
|
||||
|
||||
private waitForEquipmentManager() {
|
||||
if (!EquipmentManager.instance) {
|
||||
console.warn("EquipmentManager.instance не найден, повторная попытка...");
|
||||
this.scheduleOnce(() => { this.waitForEquipmentManager(); }, 0.1);
|
||||
return;
|
||||
}
|
||||
// Ждём завершения первоначальной загрузки данных
|
||||
|
||||
EquipmentManager.instance.initialDataPromise.then(() => {
|
||||
// Подписываемся на событие обновления данных
|
||||
EquipmentManager.instance.node.on('data-updated', this.onDataUpdated, this);
|
||||
// Если данные уже загружены, инициируем обновление списка:
|
||||
this.onDataUpdated();
|
||||
}).catch((error) => {
|
||||
console.error("Ошибка загрузки данных в EquipmentManager:", error);
|
||||
@ -74,89 +93,177 @@ export class LazyLoadList extends Component {
|
||||
private async onDataUpdated() {
|
||||
if (!EquipmentManager.instance) return;
|
||||
|
||||
// Получаем данные из EquipmentManager
|
||||
const allData: apiSensors[] = await EquipmentManager.instance.getDataList();
|
||||
console.log("Полученные данные:", allData);
|
||||
|
||||
// Логируем распределение value в полученных данных
|
||||
const valueDistribution = allData.reduce((acc, sensor) => {
|
||||
acc[sensor.value] = (acc[sensor.value] || 0) + 1;
|
||||
return acc;
|
||||
}, {} as Record<number, number>);
|
||||
console.log("Распределение value в полученных данных:", valueDistribution);
|
||||
|
||||
// Получаем список имён из equipmentNode, для нод с компонентом MeshRenderer
|
||||
const validNames: string[] = [];
|
||||
|
||||
if (this.equipmentNode) {
|
||||
console.log("equipmentNode.children:", this.equipmentNode.children.map(child => child.name));
|
||||
this.equipmentNode.children.forEach(child => {
|
||||
if (child.getComponent(MeshRenderer)) {
|
||||
validNames.push(child.name);
|
||||
} else {
|
||||
console.warn(`У ноды ${child.name} отсутствует MeshRenderer`);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
console.error("equipmentNode не задан!");
|
||||
}
|
||||
console.log("validNames:", validNames);
|
||||
|
||||
// Фильтруем данные, оставляя только элементы, имя которых есть в validNames
|
||||
const filteredData = allData.filter((item: apiSensors) => {
|
||||
const match = validNames.indexOf(item.name) !== -1;
|
||||
if (!match) {
|
||||
console.warn(`Датчик ${item.name} с value=${item.value} отфильтрован, так как его имя не найдено в validNames`);
|
||||
}
|
||||
return match;
|
||||
});
|
||||
console.log("Фильтрованные данные (до копирования):", filteredData);
|
||||
this._data = filteredData.map(item => ({ ...item }));
|
||||
console.log("Данные после копирования:", this._data);
|
||||
|
||||
this._data = allData.filter(item => validNames.indexOf(item.name) !== -1);
|
||||
this._totalCount = this._data.length;
|
||||
|
||||
// Очищаем список и загружаем первую партию элементов
|
||||
this._loadedCount = 0;
|
||||
this._content.removeAllChildren();
|
||||
this.loadNextBatch(20);
|
||||
// Очищаем активные элементы
|
||||
this.hideAllItems();
|
||||
|
||||
// Обновляем видимые элементы
|
||||
this.updateVisibleItems(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Загружает следующую партию элементов (batchSize элементов).
|
||||
*/
|
||||
loadNextBatch(batchSize: number) {
|
||||
if (this._loadedCount >= this._totalCount) return;
|
||||
private updateVisibleItems(forceUpdate: boolean = false) {
|
||||
// При принудительном обновлении всегда обновляем высоту контента
|
||||
if (forceUpdate) {
|
||||
this.updateContentHeight();
|
||||
}
|
||||
|
||||
const scrollY = this.scrollView.getScrollOffset().y;
|
||||
const viewHeight = this.scrollView.node.getComponent(UITransform)!.height;
|
||||
|
||||
const startIndex = this._loadedCount;
|
||||
const endIndex = Math.min(this._loadedCount + batchSize, this._totalCount);
|
||||
for (let i = startIndex; i < endIndex; i++) {
|
||||
const item: Node = instantiate(this.itemPrefab);
|
||||
const posY = - (this._itemHeight * (0.5 + i) + this.spacing * (i + 1));
|
||||
item.setPosition(0, posY, 0);
|
||||
// Calculate the first visible item index based on scroll position
|
||||
const newFirstVisible = Math.floor(Math.max(0, scrollY) / this._itemHeight);
|
||||
const totalItems = this._totalCount;
|
||||
|
||||
// Handle the case when there are no items
|
||||
if (totalItems <= 0) {
|
||||
this.hideAllItems();
|
||||
return;
|
||||
}
|
||||
|
||||
const newLastVisible = Math.min(
|
||||
newFirstVisible + Math.ceil(viewHeight / this._itemHeight) + 2,
|
||||
totalItems - 1
|
||||
);
|
||||
|
||||
// Always update if visible range changed OR if forced
|
||||
const needsUpdate = forceUpdate ||
|
||||
newFirstVisible !== this._firstVisibleIndex ||
|
||||
newLastVisible !== this._lastVisibleIndex;
|
||||
|
||||
if (!needsUpdate) {
|
||||
return;
|
||||
}
|
||||
|
||||
this._firstVisibleIndex = Math.max(0, newFirstVisible);
|
||||
this._lastVisibleIndex = Math.max(0, newLastVisible);
|
||||
|
||||
this.updatePoolItems();
|
||||
}
|
||||
|
||||
private hideAllItems() {
|
||||
// Return all active items to pool
|
||||
const itemsToReturn = [...this._activeItems];
|
||||
for (const item of itemsToReturn) {
|
||||
this.returnItemToPool(item);
|
||||
}
|
||||
this._activeItems = [];
|
||||
this._activeItemsData = [];
|
||||
}
|
||||
|
||||
private returnItemToPool(item: Node) {
|
||||
if (!item || !item.isValid) return;
|
||||
|
||||
item.active = false;
|
||||
item.removeFromParent();
|
||||
this.getOrCreateItemPool().put(item);
|
||||
}
|
||||
|
||||
private updatePoolItems() {
|
||||
const currentData = this._data;
|
||||
const itemsToShow = Math.min(
|
||||
this._lastVisibleIndex - this._firstVisibleIndex + 1,
|
||||
currentData.length - this._firstVisibleIndex
|
||||
);
|
||||
|
||||
const currentPool = this.getOrCreateItemPool();
|
||||
const targetActiveCount = Math.max(0, itemsToShow);
|
||||
|
||||
// Если элементов больше чем нужно - скрываем лишние
|
||||
while (this._activeItems.length > targetActiveCount) {
|
||||
const item = this._activeItems.pop()!;
|
||||
this._activeItemsData.pop();
|
||||
this.returnItemToPool(item);
|
||||
}
|
||||
|
||||
// Если элементов меньше чем нужно - добавляем новые
|
||||
while (this._activeItems.length < targetActiveCount) {
|
||||
const item = currentPool.get() || instantiate(this.itemPrefab);
|
||||
|
||||
if (!item) break;
|
||||
|
||||
this._content.addChild(item);
|
||||
item.active = true;
|
||||
this._activeItems.push(item);
|
||||
this._activeItemsData.push(null); // Placeholder для новых элементов
|
||||
}
|
||||
|
||||
const itemButton = item.getComponent(ItemButton);
|
||||
if (itemButton) {
|
||||
console.log(`Инициализация ItemButton для элемента с индексом ${i}:`, this._data[i]);
|
||||
itemButton.initialize(this._data[i]);
|
||||
itemButton.itemIndex = i;
|
||||
// Обновляем данные в существующих элементах ТОЛЬКО если данные изменились
|
||||
for (let i = 0; i < this._activeItems.length; i++) {
|
||||
const dataIndex = this._firstVisibleIndex + i;
|
||||
const item = this._activeItems[i];
|
||||
|
||||
if (dataIndex >= 0 && dataIndex < currentData.length) {
|
||||
const newData = currentData[dataIndex];
|
||||
const oldData = this._activeItemsData[i];
|
||||
|
||||
// Для новых элементов всегда обновляем данные
|
||||
// Для остальных - сравниваем данные и обновляем только если изменились
|
||||
const isNewItem = !oldData;
|
||||
const needsUpdate = isNewItem ||
|
||||
JSON.stringify(oldData) !== JSON.stringify(newData) ||
|
||||
dataIndex !== this._activeItemsData[i]?.lastDataIndex;
|
||||
|
||||
if (needsUpdate) {
|
||||
// Обновляем данные компонента
|
||||
const component = item.getComponent(ItemButton);
|
||||
if (component) {
|
||||
if (isNewItem) {
|
||||
// Для новых элементов используем полную инициализацию
|
||||
component.initialize(newData);
|
||||
} else {
|
||||
// Для существующих элементов используем обновление данных
|
||||
component.updateData(newData);
|
||||
}
|
||||
component.itemIndex = dataIndex;
|
||||
}
|
||||
|
||||
// Сохраняем новые данные для будущих сравнений
|
||||
this._activeItemsData[i] = { ...newData, lastDataIndex: dataIndex };
|
||||
}
|
||||
|
||||
// Позиционируем элемент (это нужно делать всегда для виртуализации)
|
||||
item.setPosition(0, -(dataIndex * this._itemHeight + this._itemHeight / 2 - this.spacing / 2), 0);
|
||||
|
||||
// Показываем элемент только если он еще не виден
|
||||
if (!item.active) {
|
||||
item.active = true;
|
||||
}
|
||||
} else {
|
||||
console.error("Компонент ItemButton не найден на ноде", item);
|
||||
// Скрываем элементы вне диапазона
|
||||
if (item.active) {
|
||||
item.active = false;
|
||||
}
|
||||
this._activeItemsData[i] = null;
|
||||
}
|
||||
}
|
||||
this._loadedCount = endIndex;
|
||||
this._contentUI.height = this._loadedCount * (this._itemHeight + this.spacing) + this.spacing;
|
||||
}
|
||||
|
||||
update(dt: number) {
|
||||
if (!this.scrollView.content) return;
|
||||
const threshold = 50;
|
||||
const visibleHeight = this.scrollView.node.getComponent(UITransform)!.height;
|
||||
const offset = Math.abs(this.scrollView.content.position.y);
|
||||
if (offset >= (this._contentUI.height - visibleHeight - threshold)) {
|
||||
if (this._loadedCount < this._totalCount) {
|
||||
this.loadNextBatch(20);
|
||||
}
|
||||
}
|
||||
private updateContentHeight() {
|
||||
this._contentUI.height = this._totalCount * this._itemHeight;
|
||||
}
|
||||
|
||||
onDestroy() {
|
||||
// Безопасно отписываемся от обновлений данных
|
||||
EquipmentManager.instance?.node?.off('data-updated', this.onDataUpdated, this);
|
||||
// Отписываемся от скроллинга, только если scrollView и его node ещё существуют
|
||||
this.scrollView?.node?.off('scrolling', this.onScrolling, this);
|
||||
|
||||
// Очищаем пул и активные элементы
|
||||
this._itemPool?.clear();
|
||||
this._activeItems = [];
|
||||
this._activeItemsData = [];
|
||||
}
|
||||
}
|
||||
|
||||
9
assets/Scripts/ui/animations.meta
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "1.2.0",
|
||||
"importer": "directory",
|
||||
"imported": true,
|
||||
"uuid": "3d1e8b44-c4cc-4df7-85d8-5b53068e3077",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
||||
57
assets/Scripts/ui/animations/RadialToggle.ts
Normal file
@ -0,0 +1,57 @@
|
||||
import { _decorator, Component, Node, UITransform, tween, easing, Vec3 } from 'cc';
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@ccclass('CornerToggle')
|
||||
export class CornerToggle extends Component {
|
||||
@property({ type: Node, tooltip: "Сюда перетащить ноду с Sprite и Label" })
|
||||
public targetNode: Node | null = null;
|
||||
|
||||
private _origScale = new Vec3(1, 1, 1);
|
||||
|
||||
protected start(): void {
|
||||
if (!this.targetNode) return;
|
||||
|
||||
// 1) Ставим pivot в верхний левый угол
|
||||
const ui = this.targetNode.getComponent(UITransform);
|
||||
if (ui) {
|
||||
ui.anchorX = 0;
|
||||
ui.anchorY = 1;
|
||||
}
|
||||
|
||||
// 2) Запоминаем исходный scale
|
||||
this._origScale = this.targetNode.scale.clone();
|
||||
|
||||
// 3) Приводим масштаб в соответствие текущему active
|
||||
// (родитель уже мог задать .active = false в своём onLoad)
|
||||
this.targetNode.scale = this.targetNode.active
|
||||
? this._origScale.clone()
|
||||
: new Vec3(0, 0, 0);
|
||||
}
|
||||
|
||||
/** Вызывать из кнопки */
|
||||
public toggle(): void {
|
||||
if (!this.targetNode) return;
|
||||
|
||||
const node = this.targetNode;
|
||||
const isVisible = node.active;
|
||||
|
||||
// откуда и куда анимируем
|
||||
const from = isVisible ? this._origScale.clone() : new Vec3(0, 0, 0);
|
||||
const to = isVisible ? new Vec3(0, 0, 0) : this._origScale.clone();
|
||||
|
||||
// если будем показывать — включаем до анимации
|
||||
if (!isVisible) node.active = true;
|
||||
|
||||
node.scale = from;
|
||||
|
||||
tween(node)
|
||||
.to(0.35, { scale: to }, { easing: easing.quadOut })
|
||||
.call(() => {
|
||||
// если скрываем — выключаем после
|
||||
if (isVisible) {
|
||||
node.active = false;
|
||||
}
|
||||
})
|
||||
.start();
|
||||
}
|
||||
}
|
||||
9
assets/Scripts/ui/animations/RadialToggle.ts.meta
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "4.0.24",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "29a84805-4e9f-4bd5-be09-95f75abf2b99",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
||||
@ -1,61 +1,91 @@
|
||||
import { _decorator, Component, Node, tween, Vec3 } from 'cc';
|
||||
// scripts/ui/equipmentListSwitch.ts
|
||||
import { _decorator, Component, Node, tween, Vec3, Button } from 'cc';
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@ccclass('equipmentListSwitch')
|
||||
export class equipmentListSwitch extends Component {
|
||||
// Узел со списком оборудования
|
||||
@property(Node)
|
||||
public equipmentList: Node = null!;
|
||||
/** Кнопка, которая переключает список */
|
||||
@property(Button)
|
||||
public toggleButton: Button | null = null;
|
||||
|
||||
// Смещение по оси X для закрытого состояния списка
|
||||
@property
|
||||
public offsetX: number = 250;
|
||||
/** Узел со списком оборудования */
|
||||
@property(Node)
|
||||
public equipmentList: Node = null!;
|
||||
|
||||
// Длительность анимации
|
||||
@property
|
||||
public animationDuration: number = 0.3;
|
||||
/** Смещение по X для закрытого состояния */
|
||||
@property
|
||||
public offsetX = 250;
|
||||
|
||||
// Позиции для анимации списка
|
||||
private openPos: Vec3 = new Vec3();
|
||||
private closedPos: Vec3 = new Vec3();
|
||||
/** Длительность анимации */
|
||||
@property
|
||||
public animationDuration = 0.3;
|
||||
|
||||
// Флаг, показывающий текущее состояние списка
|
||||
private isOnToggle: boolean = false;
|
||||
/** Узел стрелки, который будет поворачиваться */
|
||||
@property(Node)
|
||||
public arrow: Node | null = null;
|
||||
|
||||
|
||||
private openPos = new Vec3();
|
||||
private closedPos = new Vec3();
|
||||
private isOnToggle = false;
|
||||
|
||||
start() {
|
||||
// Сохраняем позицию списка как открытое положение
|
||||
this.openPos = this.equipmentList.getPosition().clone();
|
||||
// Вычисляем закрытое положение (смещение по оси X)
|
||||
this.closedPos = new Vec3(this.openPos.x - this.offsetX, this.openPos.y, this.openPos.z);
|
||||
|
||||
// Изначально скрываем список, устанавливая его в закрытое положение
|
||||
this.equipmentList.setPosition(this.closedPos);
|
||||
onLoad() {
|
||||
// Подписываем кнопку на метод переключения
|
||||
this.toggleButton?.node?.on('click', this.equipmentSwitch, this);
|
||||
}
|
||||
|
||||
start() {
|
||||
// Сохраняем открытое и закрытое положения
|
||||
this.openPos = this.equipmentList.getPosition().clone();
|
||||
this.closedPos = new Vec3(
|
||||
this.openPos.x - this.offsetX,
|
||||
this.openPos.y,
|
||||
this.openPos.z
|
||||
);
|
||||
|
||||
// Изначально скрываем список (перемещаем в closedPos)
|
||||
this.equipmentList.setPosition(this.closedPos);
|
||||
// Изначально стрелка в 0°
|
||||
if (this.arrow) this.arrow.angle = 0;
|
||||
}
|
||||
|
||||
private stopTween() {
|
||||
tween(this.equipmentList).stop();
|
||||
if (this.arrow) tween(this.arrow).stop();
|
||||
}
|
||||
|
||||
/** Вызывается по нажатию toggleButton */
|
||||
public equipmentSwitch() {
|
||||
this.stopTween();
|
||||
|
||||
if (this.isOnToggle) {
|
||||
// закрываем
|
||||
this.isOnToggle = false;
|
||||
tween(this.equipmentList)
|
||||
.to(this.animationDuration, { position: this.closedPos })
|
||||
.start();
|
||||
if (this.arrow) {
|
||||
tween(this.arrow)
|
||||
.to(this.animationDuration, { angle: 0 })
|
||||
.start();
|
||||
}
|
||||
} else {
|
||||
// открываем
|
||||
this.isOnToggle = true;
|
||||
tween(this.equipmentList)
|
||||
.to(this.animationDuration, { position: this.openPos })
|
||||
.start();
|
||||
if (this.arrow) {
|
||||
tween(this.arrow)
|
||||
.to(this.animationDuration, { angle: 180 })
|
||||
.start();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Метод для остановки всех текущих анимаций
|
||||
private stopTween() {
|
||||
tween(this.equipmentList).stop();
|
||||
}
|
||||
|
||||
// Метод переключения состояния списка
|
||||
public equipmentSwitch() {
|
||||
// Останавливаем текущие анимации, чтобы избежать их наложения
|
||||
this.stopTween();
|
||||
|
||||
if (this.isOnToggle) {
|
||||
// Если список открыт, закрываем его
|
||||
this.isOnToggle = false;
|
||||
tween(this.equipmentList)
|
||||
.to(this.animationDuration, { position: this.closedPos })
|
||||
.start();
|
||||
} else {
|
||||
// Если список закрыт, открываем его
|
||||
this.isOnToggle = true;
|
||||
tween(this.equipmentList)
|
||||
.to(this.animationDuration, { position: this.openPos })
|
||||
.start();
|
||||
}
|
||||
}
|
||||
onDestroy() {
|
||||
// Корректно отписываемся от клика
|
||||
this.toggleButton?.node?.off('click', this.equipmentSwitch, this);
|
||||
// Останавливаем любые выполняющиеся твины
|
||||
this.stopTween();
|
||||
}
|
||||
}
|
||||
|
||||
9
assets/Scripts/utils.meta
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "1.2.0",
|
||||
"importer": "directory",
|
||||
"imported": true,
|
||||
"uuid": "2b40a2c5-8f10-47e1-a279-4e3bca4ec221",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
||||
6
assets/Scripts/utils/SceneHistory.ts
Normal file
@ -0,0 +1,6 @@
|
||||
|
||||
// scripts/utils/SceneHistory.ts
|
||||
export class SceneHistory {
|
||||
/** Имя последней загруженной сцены */
|
||||
public static lastScene: string = '';
|
||||
}
|
||||
9
assets/Scripts/utils/SceneHistory.ts.meta
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "4.0.24",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "97252a72-96d8-473b-aa0b-c68fdf00b10b",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
||||
@ -53,7 +53,7 @@ export class ErrorButtonStatus extends Component {
|
||||
if (countError > 0) {
|
||||
this.sprite.color = new Color(255, 0, 0);
|
||||
this.button.interactable = true;
|
||||
this.label.string = `аварий: ${countError}`;
|
||||
this.label.string = `Аварий: ${countError}`;
|
||||
} else {
|
||||
this.sprite.color = new Color(128, 128, 128,0);
|
||||
this.button.interactable = false;
|
||||
|
||||
@ -13,8 +13,6 @@ export class ErrorItemButton extends Component {
|
||||
@property(Label)
|
||||
public timeLabel: Label | null = null;
|
||||
|
||||
|
||||
|
||||
@property(Button)
|
||||
public actionButton: Button | null = null; // Первая кнопка – выбирает оборудование
|
||||
|
||||
@ -23,117 +21,68 @@ export class ErrorItemButton extends Component {
|
||||
|
||||
private itemData: ErrorItemData | null = null;
|
||||
|
||||
// Инициализация данных для элемента ошибки
|
||||
public initialize(data: ErrorItemData) {
|
||||
this.itemData = data;
|
||||
if (this.nameLabel) {
|
||||
this.nameLabel.string = data.sensorName;
|
||||
}
|
||||
if (this.timeLabel) {
|
||||
this.timeLabel.string = data.description;
|
||||
}
|
||||
|
||||
|
||||
this.nameLabel && (this.nameLabel.string = data.sensorName);
|
||||
this.timeLabel && (this.timeLabel.string = data.description);
|
||||
}
|
||||
|
||||
onLoad() {
|
||||
if (this.actionButton) {
|
||||
this.actionButton.node.on('click', this.onActionClick, this);
|
||||
}
|
||||
if (this.disableAlertButton) {
|
||||
this.disableAlertButton.node.on('click', this.onDisableAlertClick, this);
|
||||
}
|
||||
// Подписываемся только если кнопки и их node существуют
|
||||
this.actionButton?.node?.on('click', this.onActionClick, this);
|
||||
this.disableAlertButton?.node?.on('click', this.onDisableAlertClick, this);
|
||||
}
|
||||
|
||||
onDestroy() {
|
||||
if (this.actionButton) {
|
||||
this.actionButton.node.off('click', this.onActionClick, this);
|
||||
}
|
||||
if (this.disableAlertButton) {
|
||||
this.disableAlertButton.node.off('click', this.onDisableAlertClick, this);
|
||||
}
|
||||
// Безопасно отписываемся
|
||||
this.actionButton?.node?.off('click', this.onActionClick, this);
|
||||
this.disableAlertButton?.node?.off('click', this.onDisableAlertClick, this);
|
||||
}
|
||||
|
||||
// Обработка клика по кнопке стандартного действия (без изменений)
|
||||
onActionClick(event?: Event) {
|
||||
|
||||
if (!this.itemData) return;
|
||||
|
||||
const sensors = EquipmentManager.instance.dataList;
|
||||
const sensorData = sensors.find(s => s.name === this.itemData!.sensorName);
|
||||
if (!sensorData) {
|
||||
console.warn(`Sensor ${this.itemData.sensorName} not found!`);
|
||||
return;
|
||||
}
|
||||
if (!sensorData) return;
|
||||
|
||||
let color = "";
|
||||
if (sensorData.value === 2) {
|
||||
color = "red";
|
||||
} else if (sensorData.value === 1) {
|
||||
color = "green";
|
||||
} else if (sensorData.value === 0) {
|
||||
color = "yellow";
|
||||
} else {
|
||||
|
||||
return;
|
||||
let color = '';
|
||||
switch (sensorData.value) {
|
||||
case 2: color = 'red'; break;
|
||||
case 1: color = 'green'; break;
|
||||
case 0: color = 'yellow'; break;
|
||||
default: return;
|
||||
}
|
||||
|
||||
const scene = this.node.scene;
|
||||
if (!scene) {
|
||||
|
||||
return;
|
||||
}
|
||||
if (!scene) return;
|
||||
|
||||
// Рекурсивно ищем узел с именем, соответствующим sensorName
|
||||
const targetNode = this.findNodeByName(scene, this.itemData.sensorName);
|
||||
if (!targetNode) {
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
const highlighter = targetNode.getComponent(PulsatingHighlighter);
|
||||
if (highlighter) {
|
||||
highlighter.switchToColor(color);
|
||||
} else {
|
||||
|
||||
}
|
||||
|
||||
const cameraMover = scene.getComponentInChildren(CameraMover);
|
||||
if (cameraMover) {
|
||||
cameraMover.moveToTarget(targetNode);
|
||||
} else {
|
||||
if (targetNode) {
|
||||
targetNode.getComponent(PulsatingHighlighter)?.switchToColor(color);
|
||||
scene.getComponentInChildren(CameraMover)?.moveToTarget(targetNode);
|
||||
}
|
||||
}
|
||||
|
||||
// Обработка клика по кнопке отключения оповещения (отправляет запрос на API)
|
||||
async onDisableAlertClick(event?: Event) {
|
||||
|
||||
if (!this.itemData) return;
|
||||
|
||||
|
||||
try {
|
||||
const response = await fetch("http://localhost:3030/api/v2/errors/resolve", {
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
body: JSON.stringify({
|
||||
sensorName: this.itemData.sensorName
|
||||
// Если требуется, можно передать alarmCode: this.itemData.alarmCode
|
||||
})
|
||||
const response = await fetch('http://localhost:3030/api/v2/errors/resolve', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ sensorName: this.itemData.sensorName })
|
||||
});
|
||||
const result = await response.json();
|
||||
console.log("Error resolved:", result);
|
||||
// При необходимости можно вызвать обновление состояния ErrorManager
|
||||
console.log('Error resolved:', await response.json());
|
||||
} catch (error) {
|
||||
console.error("Error resolving error via API:", error);
|
||||
console.error('Error resolving via API:', error);
|
||||
}
|
||||
}
|
||||
|
||||
// Рекурсивный поиск узла по имени
|
||||
private findNodeByName(root: Node, name: string): Node | null {
|
||||
if (root.name === name) return root;
|
||||
for (let i = 0; i < root.children.length; i++) {
|
||||
const found = this.findNodeByName(root.children[i], name);
|
||||
for (const child of root.children) {
|
||||
const found = this.findNodeByName(child, name);
|
||||
if (found) return found;
|
||||
}
|
||||
return null;
|
||||
|
||||
@ -1,5 +1,3 @@
|
||||
|
||||
|
||||
import { _decorator, Component, Label, Button, Node, Event } from 'cc';
|
||||
import { EquipmentManager } from '../stores/EquipmentManager';
|
||||
import { PulsatingHighlighter } from '../PulsatingHighlighter';
|
||||
@ -15,16 +13,11 @@ export class ErrorItemNamedButton extends Component {
|
||||
@property(Label)
|
||||
public timeLabel: Label | null = null;
|
||||
|
||||
|
||||
|
||||
@property(Button)
|
||||
public actionButton: Button | null = null; // Первая кнопка – выбирает оборудование
|
||||
|
||||
|
||||
|
||||
private itemData: ErrorItemData | null = null;
|
||||
|
||||
// Инициализация данных для элемента ошибки
|
||||
public initialize(data: ErrorItemData) {
|
||||
this.itemData = data;
|
||||
if (this.nameLabel) {
|
||||
@ -33,27 +26,17 @@ export class ErrorItemNamedButton extends Component {
|
||||
if (this.timeLabel) {
|
||||
this.timeLabel.string = data.timestamp;
|
||||
}
|
||||
|
||||
console.log('Initialized ErrorItemButton with data:', data);
|
||||
}
|
||||
|
||||
onLoad() {
|
||||
if (this.actionButton) {
|
||||
this.actionButton.node.on('click', this.onActionClick, this);
|
||||
} else {
|
||||
console.warn('Action button not assigned.');
|
||||
}
|
||||
|
||||
this.actionButton?.node?.on('click', this.onActionClick, this);
|
||||
}
|
||||
|
||||
onDestroy() {
|
||||
if (this.actionButton) {
|
||||
this.actionButton.node.off('click', this.onActionClick, this);
|
||||
}
|
||||
|
||||
this.actionButton?.node?.off('click', this.onActionClick, this);
|
||||
}
|
||||
|
||||
// Обработка клика по кнопке стандартного действия (без изменений)
|
||||
onActionClick(event?: Event) {
|
||||
console.log('Action clicked for error:', this.itemData);
|
||||
if (!this.itemData) return;
|
||||
@ -83,7 +66,6 @@ export class ErrorItemNamedButton extends Component {
|
||||
return;
|
||||
}
|
||||
|
||||
// Рекурсивно ищем узел с именем, соответствующим sensorName
|
||||
const targetNode = this.findNodeByName(scene, this.itemData.sensorName);
|
||||
if (!targetNode) {
|
||||
console.warn(`Node with name ${this.itemData.sensorName} not found!`);
|
||||
@ -105,14 +87,10 @@ export class ErrorItemNamedButton extends Component {
|
||||
}
|
||||
}
|
||||
|
||||
// Обработка клика по кнопке отключения оповещения (отправляет запрос на API)
|
||||
|
||||
|
||||
// Рекурсивный поиск узла по имени
|
||||
private findNodeByName(root: Node, name: string): Node | null {
|
||||
if (root.name === name) return root;
|
||||
for (let i = 0; i < root.children.length; i++) {
|
||||
const found = this.findNodeByName(root.children[i], name);
|
||||
for (const child of root.children) {
|
||||
const found = this.findNodeByName(child, name);
|
||||
if (found) return found;
|
||||
}
|
||||
return null;
|
||||
|
||||
@ -45,10 +45,28 @@ export class ItemButton extends Component {
|
||||
this.itemData = data;
|
||||
if (this.nameLabel) {
|
||||
this.nameLabel.string = data.name;
|
||||
// Изначально скрываем кнопку ошибок
|
||||
this.ErrorButton.node.active = false;
|
||||
}
|
||||
// Дополнительная логика, если требуется
|
||||
|
||||
// Обновляем состояние ошибок без мерцания
|
||||
this.updateErrorStatus();
|
||||
}
|
||||
|
||||
/**
|
||||
* Обновляет только данные элемента без полной переинициализации
|
||||
*/
|
||||
public updateData(data: apiSensors) {
|
||||
// Проверяем, действительно ли данные изменились
|
||||
if (this.itemData && this.itemData.name === data.name && this.itemData.value === data.value) {
|
||||
return; // Данные не изменились, не обновляем
|
||||
}
|
||||
|
||||
this.itemData = data;
|
||||
if (this.nameLabel && this.nameLabel.string !== data.name) {
|
||||
this.nameLabel.string = data.name;
|
||||
}
|
||||
|
||||
// Обновляем состояние ошибок только если данные действительно изменились
|
||||
this.updateErrorStatus();
|
||||
}
|
||||
|
||||
onLoad() {
|
||||
@ -70,16 +88,10 @@ export class ItemButton extends Component {
|
||||
}
|
||||
|
||||
onDestroy() {
|
||||
if (this.button) {
|
||||
this.button.node.off("click", this.onClick, this);
|
||||
}
|
||||
if (this.ErrorButton) {
|
||||
this.ErrorButton.node.off("click", this.onErrorClick, this);
|
||||
}
|
||||
if (ErrorManager.instance) {
|
||||
ErrorManager.instance.node.off('errors-updated', this.updateErrorStatus, this);
|
||||
}
|
||||
}
|
||||
this.button?.node?.off("click", this.onClick, this);
|
||||
this.ErrorButton?.node?.off("click", this.onErrorClick, this);
|
||||
ErrorManager.instance?.node?.off("errors-updated", this.updateErrorStatus, this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Рекурсивный поиск узла по имени.
|
||||
@ -215,16 +227,20 @@ export class ItemButton extends Component {
|
||||
* Обновление состояния ошибки на кнопке в зависимости от данных оборудования.
|
||||
*/
|
||||
private updateErrorStatus() {
|
||||
if (!this.itemData || !EquipmentManager.instance || !ErrorManager.instance) {
|
||||
return;
|
||||
}
|
||||
|
||||
const sensors = EquipmentManager.instance.dataList;
|
||||
const sensorData = sensors.find((s) => s.name === this.itemData.name);
|
||||
if (!sensorData) {
|
||||
this.ErrorButton.node.active = false;
|
||||
this.setErrorButtonState(false, "0");
|
||||
return;
|
||||
}
|
||||
|
||||
// Если датчик активен – скрываем кнопку ошибок
|
||||
if (sensorData.value === SensorStatus.Active) {
|
||||
this.ErrorButton.node.active = false;
|
||||
this.setErrorButtonState(false, "0");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -238,10 +254,26 @@ export class ItemButton extends Component {
|
||||
|
||||
// Если есть хотя бы одна ошибка, отображаем кнопку с количеством ошибок
|
||||
if (errorCount > 0) {
|
||||
this.ErrorButton.node.active = true;
|
||||
this.ErrorNumber.string = errorCount.toString();
|
||||
this.setErrorButtonState(true, errorCount.toString());
|
||||
} else {
|
||||
this.ErrorButton.node.active = false;
|
||||
this.setErrorButtonState(false, "0");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Устанавливает состояние кнопки ошибок только если оно изменилось
|
||||
*/
|
||||
private setErrorButtonState(isVisible: boolean, errorText: string) {
|
||||
if (!this.ErrorButton || !this.ErrorNumber) return;
|
||||
|
||||
// Обновляем видимость только если она изменилась
|
||||
if (this.ErrorButton.node.active !== isVisible) {
|
||||
this.ErrorButton.node.active = isVisible;
|
||||
}
|
||||
|
||||
// Обновляем текст только если он изменился
|
||||
if (this.ErrorNumber.string !== errorText) {
|
||||
this.ErrorNumber.string = errorText;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
146
assets/Scripts/ux/MorphButtonWithButton.ts
Normal file
@ -0,0 +1,146 @@
|
||||
import { _decorator, Component, Sprite, SpriteFrame, tween, Button, Tween, Node, Color } from 'cc';
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@ccclass('MorphButtonWithButton')
|
||||
export class MorphButtonWithButton extends Component {
|
||||
@property(SpriteFrame) questionFrame!: SpriteFrame;
|
||||
@property(SpriteFrame) noiseFrame!: SpriteFrame;
|
||||
@property(SpriteFrame) crossFrame!: SpriteFrame;
|
||||
|
||||
@property(Sprite) targetSprite!: Sprite;
|
||||
|
||||
private isQuestion = true;
|
||||
private buttonId: string = '';
|
||||
private currentTween: Tween<Node> | null = null;
|
||||
|
||||
onLoad() {
|
||||
// Генерируем уникальный ID для кнопки
|
||||
this.buttonId = `${this.node.name}_${Date.now()}_${Math.random().toString(36).substring(2, 11)}`;
|
||||
console.log(`[MorphButton] onLoad: ${this.node.name} (${this.node.uuid}), buttonId: ${this.buttonId}`);
|
||||
this.initializeSprite();
|
||||
}
|
||||
|
||||
private initializeSprite() {
|
||||
if (this.targetSprite && this.questionFrame) {
|
||||
this.targetSprite.spriteFrame = this.questionFrame;
|
||||
this.isQuestion = true;
|
||||
}
|
||||
}
|
||||
|
||||
public fullReinitialize() {
|
||||
console.log(`[MorphButton] fullReinitialize START: ${this.node.name} (${this.node.uuid}), current state: ${this.isQuestion ? 'question' : 'cross'}`);
|
||||
|
||||
// Останавливаем все анимации
|
||||
if (this.currentTween) {
|
||||
this.currentTween.stop();
|
||||
this.currentTween = null;
|
||||
}
|
||||
Tween.stopAllByTarget(this.targetSprite?.node);
|
||||
|
||||
// Полностью переинициализируем состояние
|
||||
this.isQuestion = true;
|
||||
this.currentTween = null;
|
||||
|
||||
// Переинициализируем спрайт
|
||||
this.initializeSprite();
|
||||
|
||||
// Генерируем новый ID для отладки
|
||||
this.buttonId = `${this.node.name}_${Date.now()}_${Math.random().toString(36).substring(2, 11)}`;
|
||||
console.log(`[MorphButton] fullReinitialize COMPLETE: ${this.node.name}, new state: ${this.isQuestion ? 'question' : 'cross'}, buttonId: ${this.buttonId}`);
|
||||
}
|
||||
|
||||
onDestroy() {
|
||||
// Останавливаем все анимации при уничтожении
|
||||
if (this.currentTween) {
|
||||
this.currentTween.stop();
|
||||
this.currentTween = null;
|
||||
}
|
||||
Tween.stopAllByTarget(this.targetSprite?.node);
|
||||
}
|
||||
|
||||
public onClick() {
|
||||
console.log(`[MorphButton] onClick: ${this.node.name} (${this.node.uuid}), buttonId: ${this.buttonId}, current state: ${this.isQuestion ? 'question' : 'cross'}`);
|
||||
|
||||
// Останавливаем предыдущую анимацию, если она есть
|
||||
if (this.currentTween) {
|
||||
this.currentTween.stop();
|
||||
this.currentTween = null;
|
||||
}
|
||||
|
||||
const frames = this.isQuestion
|
||||
? [this.noiseFrame, this.crossFrame]
|
||||
: [this.noiseFrame, this.questionFrame];
|
||||
const dt = 0.055;
|
||||
|
||||
// Передаём цель – targetSprite.node, чтобы Tween точно запустился
|
||||
let tw = tween(this.targetSprite.node);
|
||||
for (const frame of frames) {
|
||||
tw = tw
|
||||
.delay(dt)
|
||||
.call(() => {
|
||||
this.targetSprite.spriteFrame = frame;
|
||||
});
|
||||
}
|
||||
|
||||
// Меняем состояние только после завершения анимации
|
||||
tw = tw.call(() => {
|
||||
this.isQuestion = !this.isQuestion;
|
||||
console.log(`[MorphButton] Animation complete, new state: ${this.isQuestion ? 'question' : 'cross'}`);
|
||||
});
|
||||
|
||||
// Сохраняем ссылку на текущий tween
|
||||
this.currentTween = tw;
|
||||
tw.start();
|
||||
}
|
||||
|
||||
public resetState() {
|
||||
console.log(`[MorphButton] resetState: ${this.node.name} (${this.node.uuid}), buttonId: ${this.buttonId}, was: ${this.isQuestion ? 'question' : 'cross'}`);
|
||||
|
||||
// Останавливаем любые активные анимации
|
||||
if (this.currentTween) {
|
||||
this.currentTween.stop();
|
||||
this.currentTween = null;
|
||||
}
|
||||
|
||||
// Останавливаем все tween на спрайте
|
||||
Tween.stopAllByTarget(this.targetSprite.node);
|
||||
|
||||
// Сбрасываем состояние
|
||||
this.isQuestion = true;
|
||||
|
||||
// Принудительно сбрасываем спрайт
|
||||
this.forceResetSprite();
|
||||
}
|
||||
|
||||
private forceResetSprite() {
|
||||
if (!this.targetSprite || !this.questionFrame) {
|
||||
console.warn('[MorphButton] Cannot reset sprite - missing targetSprite or questionFrame');
|
||||
return;
|
||||
}
|
||||
|
||||
// Метод 1: Прямая установка
|
||||
this.targetSprite.spriteFrame = this.questionFrame;
|
||||
|
||||
// Метод 2: Очистка и повторная установка
|
||||
this.targetSprite.spriteFrame = null;
|
||||
this.scheduleOnce(() => {
|
||||
if (this.targetSprite && this.questionFrame) {
|
||||
this.targetSprite.spriteFrame = this.questionFrame;
|
||||
console.log(`[MorphButton] Sprite reset complete`);
|
||||
}
|
||||
}, 0);
|
||||
|
||||
// Метод 3: Принудительное обновление через изменение других свойств
|
||||
const originalColor = this.targetSprite.color.clone();
|
||||
this.targetSprite.color = new Color(255, 255, 255, 254);
|
||||
this.targetSprite.color = originalColor;
|
||||
}
|
||||
|
||||
public getButtonId(): string {
|
||||
return this.buttonId;
|
||||
}
|
||||
|
||||
public getIsQuestion(): boolean {
|
||||
return this.isQuestion;
|
||||
}
|
||||
}
|
||||
9
assets/Scripts/ux/MorphButtonWithButton.ts.meta
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "4.0.24",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "4d4ae451-9c31-45f6-82d9-79ae9893eefa",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
||||
@ -1,4 +1,6 @@
|
||||
import { _decorator, Component, director, SceneAsset, input, Input, EventMouse, CameraComponent, geometry, PhysicsSystem } from 'cc';
|
||||
// scripts/SceneLoaderOnDoubleClick3D.ts
|
||||
import { _decorator, Component, director, SceneAsset, input, Input, EventMouse, geometry, PhysicsSystem, Camera } from 'cc';
|
||||
import { SceneHistory } from '../utils/SceneHistory';
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@ccclass('SceneLoaderOnDoubleClick3D')
|
||||
@ -6,54 +8,57 @@ export class SceneLoaderOnDoubleClick3D extends Component {
|
||||
@property({ type: SceneAsset, tooltip: 'Сцена для загрузки при двойном клике' })
|
||||
public targetScene: SceneAsset | null = null;
|
||||
|
||||
@property({ type: CameraComponent, tooltip: 'Основная камера' })
|
||||
public camera: CameraComponent | null = null;
|
||||
@property({ type: Camera, tooltip: 'Основная камера' })
|
||||
public camera: Camera | null = null;
|
||||
|
||||
// Интервал для определения двойного клика (в мс)
|
||||
private _doubleClickThreshold: number = 300;
|
||||
private _lastClickTime: number = 0;
|
||||
private _doubleClickThreshold = 300;
|
||||
private _lastClickTime = 0;
|
||||
|
||||
onLoad() {
|
||||
// Подписываемся на глобальное событие
|
||||
input.on(Input.EventType.MOUSE_DOWN, this.onMouseDown, this);
|
||||
}
|
||||
|
||||
onDestroy() {
|
||||
input.off(Input.EventType.MOUSE_DOWN, this.onMouseDown, this);
|
||||
input?.off(Input.EventType.MOUSE_DOWN, this.onMouseDown, this);
|
||||
}
|
||||
|
||||
onMouseDown(event: EventMouse) {
|
||||
private onMouseDown(event: EventMouse) {
|
||||
if (event.getButton() !== EventMouse.BUTTON_LEFT) return;
|
||||
const now = performance.now();
|
||||
if (now - this._lastClickTime < this._doubleClickThreshold) {
|
||||
this.handleDoubleClick(event);
|
||||
this._lastClickTime = 0;
|
||||
} else {
|
||||
this._lastClickTime = now;
|
||||
}
|
||||
}
|
||||
|
||||
const currentTime = Date.now();
|
||||
if (currentTime - this._lastClickTime < this._doubleClickThreshold) {
|
||||
// Если камера не назначена, выводим ошибку
|
||||
if (!this.camera) {
|
||||
console.error('Основная камера не назначена!');
|
||||
return;
|
||||
}
|
||||
|
||||
// Выполняем преобразование экрана в луч
|
||||
const clickPos = event.getLocation(); // координаты клика
|
||||
let ray = new geometry.Ray();
|
||||
this.camera.screenPointToRay(clickPos.x, clickPos.y, ray);
|
||||
private handleDoubleClick(event: EventMouse) {
|
||||
if (!this.camera) {
|
||||
console.error('Камера не назначена!');
|
||||
return;
|
||||
}
|
||||
|
||||
// Выполняем Raycast
|
||||
if (PhysicsSystem.instance.raycast(ray)) {
|
||||
const results = PhysicsSystem.instance.raycastResults;
|
||||
// Проверяем, что среди результатов есть наш объект
|
||||
let hit = results.find(result => result.collider.node === this.node);
|
||||
if (hit) {
|
||||
console.log(`Двойной клик по ${this.node.name}`);
|
||||
if (this.targetScene) {
|
||||
console.log(`Загрузка сцены: ${this.targetScene.name}`);
|
||||
director.loadScene(this.targetScene.name);
|
||||
const x = event.getLocationX();
|
||||
const y = event.getLocationY();
|
||||
const ray = new geometry.Ray();
|
||||
this.camera.screenPointToRay(x, y, ray);
|
||||
|
||||
if (PhysicsSystem.instance.raycastClosest(ray)) {
|
||||
const res = PhysicsSystem.instance.raycastClosestResult;
|
||||
if (res.collider?.node === this.node) {
|
||||
if (this.targetScene) {
|
||||
// вариант с проверкой
|
||||
const cur = director.getScene();
|
||||
if (cur) {
|
||||
SceneHistory.lastScene = cur.name;
|
||||
} else {
|
||||
console.error('Сцена не указана!');
|
||||
console.warn('Не удалось получить текущую сцену');
|
||||
}
|
||||
|
||||
director.loadScene(this.targetScene.name);
|
||||
}
|
||||
}
|
||||
}
|
||||
this._lastClickTime = currentTime;
|
||||
}
|
||||
}
|
||||
|
||||
42
assets/Scripts/ux/ScrollSync.ts
Normal file
@ -0,0 +1,42 @@
|
||||
// scripts/ui/ScrollHandler.ts
|
||||
import { _decorator, Component, ScrollView, ScrollBar, UITransform, EventTouch, Vec3, clamp } from 'cc';
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@ccclass('ScrollHandler')
|
||||
export class ScrollHandler extends Component {
|
||||
@property(ScrollView) scrollView: ScrollView = null!;
|
||||
@property(ScrollBar) scrollBar: ScrollBar = null!;
|
||||
|
||||
onLoad() {
|
||||
// Подпишемся, только если есть handle-спрайт
|
||||
const handleSprite = this.scrollBar.handle;
|
||||
if (!handleSprite) {
|
||||
console.error('ScrollHandler: у ScrollBar нет handle–спрайта!');
|
||||
return;
|
||||
}
|
||||
handleSprite.node.on('touch-move', this.onDrag, this);
|
||||
}
|
||||
|
||||
onDestroy() {
|
||||
// Безопасно отписываемся от события touch-move
|
||||
this.scrollBar.handle?.node?.off('touch-move', this.onDrag, this);
|
||||
}
|
||||
|
||||
private onDrag(evt: EventTouch) {
|
||||
const handleSprite = this.scrollBar.handle;
|
||||
if (!handleSprite) return;
|
||||
|
||||
const barNode = this.scrollBar.node;
|
||||
const ui = barNode.getComponent(UITransform)!;
|
||||
const worldPos = evt.getLocation();
|
||||
const local = ui.convertToNodeSpaceAR(new Vec3(worldPos.x, worldPos.y, 0));
|
||||
|
||||
const H = ui.height;
|
||||
const handleH = handleSprite.node.getComponent(UITransform)!.height;
|
||||
let pct = (local.y + H/2 - handleH/2) / (H - handleH);
|
||||
pct = clamp(pct, 0, 1);
|
||||
|
||||
// ПРОПУСКАЕМ инверсию — передаём pct напрямую
|
||||
this.scrollView.scrollToPercentVertical(pct, 0);
|
||||
}
|
||||
}
|
||||
9
assets/Scripts/ux/ScrollSync.ts.meta
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "4.0.24",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "3a213e52-0450-4f60-bdb7-30ab6bd6a528",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
||||
@ -11,8 +11,6 @@ export class ToggleListButton extends Component {
|
||||
@property(Node)
|
||||
public equipmentList: Node = null!;
|
||||
|
||||
// Флаг состояния списка (открыт/закрыт)
|
||||
private isListActive: boolean = false;
|
||||
|
||||
// Позиция, когда список виден (запоминается при загрузке)
|
||||
private visiblePos: Vec3 = new Vec3();
|
||||
@ -22,12 +20,16 @@ export class ToggleListButton extends Component {
|
||||
|
||||
// Длительность анимации в секундах
|
||||
@property
|
||||
public slideDuration: number = 0.2;
|
||||
public slideDuration: number = 0.4;
|
||||
|
||||
// Смещение по оси X для скрытого состояния (например, на сколько пикселей список смещается вправо)
|
||||
@property
|
||||
public slideOffset: number = 300;
|
||||
|
||||
// Узел стрелки, который будет поворачиваться
|
||||
@property({ type: Node })
|
||||
public arrow: Node | null = null;
|
||||
|
||||
onLoad() {
|
||||
// Инициализируем синглтон
|
||||
ToggleListButton.instance = this;
|
||||
@ -42,7 +44,11 @@ export class ToggleListButton extends Component {
|
||||
// Изначально помещаем список в скрытое состояние и деактивируем его
|
||||
this.equipmentList.setPosition(this.hiddenPos);
|
||||
this.equipmentList.active = false;
|
||||
this.isListActive = false;
|
||||
}
|
||||
|
||||
// Изначально устанавливаем стрелке угол 0
|
||||
if (this.arrow) {
|
||||
this.arrow.angle = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@ -67,7 +73,14 @@ export class ToggleListButton extends Component {
|
||||
tween(this.equipmentList)
|
||||
.to(this.slideDuration, { position: this.visiblePos })
|
||||
.start();
|
||||
this.isListActive = true;
|
||||
|
||||
// Поворачиваем стрелку на 180° вместе с анимацией списка
|
||||
if (this.arrow) {
|
||||
tween(this.arrow)
|
||||
.to(this.slideDuration, { angle: -180 })
|
||||
.start();
|
||||
}
|
||||
|
||||
// Если нужно сбросить фильтр при открытии
|
||||
ErrorLazyLoadList.instance?.resetFilter();
|
||||
} else {
|
||||
@ -78,7 +91,14 @@ export class ToggleListButton extends Component {
|
||||
this.equipmentList.active = false;
|
||||
})
|
||||
.start();
|
||||
this.isListActive = false;
|
||||
|
||||
// Возвращаем стрелку в исходное положение (0°)
|
||||
if (this.arrow) {
|
||||
tween(this.arrow)
|
||||
.to(this.slideDuration, { angle: 0 })
|
||||
.start();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -91,21 +111,27 @@ export class ToggleListButton extends Component {
|
||||
if (!this.equipmentList.active) {
|
||||
// Активируем список, помещаем его в скрытую позицию и анимированно перемещаем в видимое положение
|
||||
this.equipmentList.active = true;
|
||||
this.equipmentList.setPosition(this.hiddenPos);
|
||||
this.equipmentList.setPosition(this.hiddenPos);
|
||||
tween(this.equipmentList)
|
||||
.to(this.slideDuration, { position: this.visiblePos })
|
||||
.start();
|
||||
this.isListActive = true;
|
||||
|
||||
// Поворачиваем стрелку на 180°
|
||||
if (this.arrow) {
|
||||
tween(this.arrow)
|
||||
.to(this.slideDuration, { angle: -180 })
|
||||
.start();
|
||||
}
|
||||
|
||||
}
|
||||
// Сбрасываем фильтр независимо от состояния списка
|
||||
ErrorLazyLoadList.instance?.resetFilter();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Гарантированное открытие списка (если он закрыт) и сброс фильтра.
|
||||
/**
|
||||
* Гарантированное открытие списка (если он закрыт).
|
||||
*/
|
||||
public open() {
|
||||
public open() {
|
||||
if (!this.equipmentList) return;
|
||||
|
||||
if (!this.equipmentList.active) {
|
||||
@ -115,9 +141,14 @@ export class ToggleListButton extends Component {
|
||||
tween(this.equipmentList)
|
||||
.to(this.slideDuration, { position: this.visiblePos })
|
||||
.start();
|
||||
this.isListActive = true;
|
||||
|
||||
// Поворачиваем стрелку на 180°
|
||||
if (this.arrow) {
|
||||
tween(this.arrow)
|
||||
.to(this.slideDuration, { angle: -180 })
|
||||
.start();
|
||||
}
|
||||
|
||||
}
|
||||
// Сбрасываем фильтр независимо от состояния списка
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -3,14 +3,28 @@ const { ccclass, property } = _decorator;
|
||||
|
||||
@ccclass('switchWalls')
|
||||
export class switchWalls extends Component {
|
||||
@property(Node) Walls : Node = null!;
|
||||
isOnToggle: boolean = true;
|
||||
private static _instance: switchWalls = null!;
|
||||
|
||||
|
||||
|
||||
wallSwitch() {
|
||||
if (this.isOnToggle) {
|
||||
this.Walls.active = !this.Walls.active ;
|
||||
}
|
||||
}
|
||||
}
|
||||
// Ссылка на ноду стен
|
||||
@property(Node)
|
||||
public walls: Node = null!;
|
||||
|
||||
onLoad() {
|
||||
// Записываем текущий экземпляр (не создавайте через new!)
|
||||
switchWalls._instance = this;
|
||||
}
|
||||
|
||||
public static getInstance(): switchWalls {
|
||||
return switchWalls._instance;
|
||||
}
|
||||
|
||||
// Метод для скрытия стен
|
||||
public hideWalls(): void {
|
||||
this.walls.active = false;
|
||||
}
|
||||
|
||||
// Метод для отображения стен
|
||||
public showWalls(): void {
|
||||
this.walls.active = true;
|
||||
}
|
||||
}
|
||||
|
||||
BIN
assets/Sprites/arrow_black_left_path2.png
Normal file
|
After Width: | Height: | Size: 308 B |
134
assets/Sprites/arrow_black_left_path2.png.meta
Normal file
@ -0,0 +1,134 @@
|
||||
{
|
||||
"ver": "1.0.27",
|
||||
"importer": "image",
|
||||
"imported": true,
|
||||
"uuid": "3d8cdb45-6992-4b14-bb60-bb556f33c720",
|
||||
"files": [
|
||||
".json",
|
||||
".png"
|
||||
],
|
||||
"subMetas": {
|
||||
"6c48a": {
|
||||
"importer": "texture",
|
||||
"uuid": "3d8cdb45-6992-4b14-bb60-bb556f33c720@6c48a",
|
||||
"displayName": "arrow_black_left_path2",
|
||||
"id": "6c48a",
|
||||
"name": "texture",
|
||||
"userData": {
|
||||
"wrapModeS": "clamp-to-edge",
|
||||
"wrapModeT": "clamp-to-edge",
|
||||
"minfilter": "linear",
|
||||
"magfilter": "linear",
|
||||
"mipfilter": "none",
|
||||
"anisotropy": 0,
|
||||
"isUuid": true,
|
||||
"imageUuidOrDatabaseUri": "3d8cdb45-6992-4b14-bb60-bb556f33c720",
|
||||
"visible": false
|
||||
},
|
||||
"ver": "1.0.22",
|
||||
"imported": true,
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {}
|
||||
},
|
||||
"f9941": {
|
||||
"importer": "sprite-frame",
|
||||
"uuid": "3d8cdb45-6992-4b14-bb60-bb556f33c720@f9941",
|
||||
"displayName": "arrow_black_left_path2",
|
||||
"id": "f9941",
|
||||
"name": "spriteFrame",
|
||||
"userData": {
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 0,
|
||||
"trimY": 0,
|
||||
"width": 14,
|
||||
"height": 14,
|
||||
"rawWidth": 14,
|
||||
"rawHeight": 14,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"packable": true,
|
||||
"pixelsToUnit": 100,
|
||||
"pivotX": 0.5,
|
||||
"pivotY": 0.5,
|
||||
"meshType": 0,
|
||||
"vertices": {
|
||||
"rawPosition": [
|
||||
-7,
|
||||
-7,
|
||||
0,
|
||||
7,
|
||||
-7,
|
||||
0,
|
||||
-7,
|
||||
7,
|
||||
0,
|
||||
7,
|
||||
7,
|
||||
0
|
||||
],
|
||||
"indexes": [
|
||||
0,
|
||||
1,
|
||||
2,
|
||||
2,
|
||||
1,
|
||||
3
|
||||
],
|
||||
"uv": [
|
||||
0,
|
||||
14,
|
||||
14,
|
||||
14,
|
||||
0,
|
||||
0,
|
||||
14,
|
||||
0
|
||||
],
|
||||
"nuv": [
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
1,
|
||||
1
|
||||
],
|
||||
"minPos": [
|
||||
-7,
|
||||
-7,
|
||||
0
|
||||
],
|
||||
"maxPos": [
|
||||
7,
|
||||
7,
|
||||
0
|
||||
]
|
||||
},
|
||||
"isUuid": true,
|
||||
"imageUuidOrDatabaseUri": "3d8cdb45-6992-4b14-bb60-bb556f33c720@6c48a",
|
||||
"atlasUuid": ""
|
||||
},
|
||||
"ver": "1.0.12",
|
||||
"imported": true,
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {}
|
||||
}
|
||||
},
|
||||
"userData": {
|
||||
"hasAlpha": true,
|
||||
"type": "sprite-frame",
|
||||
"fixAlphaTransparencyArtifacts": false,
|
||||
"redirect": "3d8cdb45-6992-4b14-bb60-bb556f33c720@6c48a"
|
||||
}
|
||||
}
|
||||
BIN
assets/Sprites/arrow_black_path2.png
Normal file
|
After Width: | Height: | Size: 307 B |
134
assets/Sprites/arrow_black_path2.png.meta
Normal file
@ -0,0 +1,134 @@
|
||||
{
|
||||
"ver": "1.0.27",
|
||||
"importer": "image",
|
||||
"imported": true,
|
||||
"uuid": "22526246-946b-439e-82fe-84f276702442",
|
||||
"files": [
|
||||
".json",
|
||||
".png"
|
||||
],
|
||||
"subMetas": {
|
||||
"6c48a": {
|
||||
"importer": "texture",
|
||||
"uuid": "22526246-946b-439e-82fe-84f276702442@6c48a",
|
||||
"displayName": "arrow_black_path2",
|
||||
"id": "6c48a",
|
||||
"name": "texture",
|
||||
"userData": {
|
||||
"wrapModeS": "clamp-to-edge",
|
||||
"wrapModeT": "clamp-to-edge",
|
||||
"minfilter": "linear",
|
||||
"magfilter": "linear",
|
||||
"mipfilter": "none",
|
||||
"anisotropy": 0,
|
||||
"isUuid": true,
|
||||
"imageUuidOrDatabaseUri": "22526246-946b-439e-82fe-84f276702442",
|
||||
"visible": false
|
||||
},
|
||||
"ver": "1.0.22",
|
||||
"imported": true,
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {}
|
||||
},
|
||||
"f9941": {
|
||||
"importer": "sprite-frame",
|
||||
"uuid": "22526246-946b-439e-82fe-84f276702442@f9941",
|
||||
"displayName": "arrow_black_path2",
|
||||
"id": "f9941",
|
||||
"name": "spriteFrame",
|
||||
"userData": {
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 0,
|
||||
"trimY": 0,
|
||||
"width": 14,
|
||||
"height": 14,
|
||||
"rawWidth": 14,
|
||||
"rawHeight": 14,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"packable": true,
|
||||
"pixelsToUnit": 100,
|
||||
"pivotX": 0.5,
|
||||
"pivotY": 0.5,
|
||||
"meshType": 0,
|
||||
"vertices": {
|
||||
"rawPosition": [
|
||||
-7,
|
||||
-7,
|
||||
0,
|
||||
7,
|
||||
-7,
|
||||
0,
|
||||
-7,
|
||||
7,
|
||||
0,
|
||||
7,
|
||||
7,
|
||||
0
|
||||
],
|
||||
"indexes": [
|
||||
0,
|
||||
1,
|
||||
2,
|
||||
2,
|
||||
1,
|
||||
3
|
||||
],
|
||||
"uv": [
|
||||
0,
|
||||
14,
|
||||
14,
|
||||
14,
|
||||
0,
|
||||
0,
|
||||
14,
|
||||
0
|
||||
],
|
||||
"nuv": [
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
1,
|
||||
1
|
||||
],
|
||||
"minPos": [
|
||||
-7,
|
||||
-7,
|
||||
0
|
||||
],
|
||||
"maxPos": [
|
||||
7,
|
||||
7,
|
||||
0
|
||||
]
|
||||
},
|
||||
"isUuid": true,
|
||||
"imageUuidOrDatabaseUri": "22526246-946b-439e-82fe-84f276702442@6c48a",
|
||||
"atlasUuid": ""
|
||||
},
|
||||
"ver": "1.0.12",
|
||||
"imported": true,
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {}
|
||||
}
|
||||
},
|
||||
"userData": {
|
||||
"hasAlpha": true,
|
||||
"type": "sprite-frame",
|
||||
"fixAlphaTransparencyArtifacts": false,
|
||||
"redirect": "22526246-946b-439e-82fe-84f276702442@6c48a"
|
||||
}
|
||||
}
|
||||
BIN
assets/Sprites/left_arrow_left_menu.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
134
assets/Sprites/left_arrow_left_menu.png.meta
Normal file
@ -0,0 +1,134 @@
|
||||
{
|
||||
"ver": "1.0.27",
|
||||
"importer": "image",
|
||||
"imported": true,
|
||||
"uuid": "d06aaaa9-662d-47e1-ac63-f2bba5eb496f",
|
||||
"files": [
|
||||
".json",
|
||||
".png"
|
||||
],
|
||||
"subMetas": {
|
||||
"6c48a": {
|
||||
"importer": "texture",
|
||||
"uuid": "d06aaaa9-662d-47e1-ac63-f2bba5eb496f@6c48a",
|
||||
"displayName": "left_arrow_left_menu",
|
||||
"id": "6c48a",
|
||||
"name": "texture",
|
||||
"userData": {
|
||||
"wrapModeS": "clamp-to-edge",
|
||||
"wrapModeT": "clamp-to-edge",
|
||||
"minfilter": "linear",
|
||||
"magfilter": "linear",
|
||||
"mipfilter": "none",
|
||||
"anisotropy": 0,
|
||||
"isUuid": true,
|
||||
"imageUuidOrDatabaseUri": "d06aaaa9-662d-47e1-ac63-f2bba5eb496f",
|
||||
"visible": false
|
||||
},
|
||||
"ver": "1.0.22",
|
||||
"imported": true,
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {}
|
||||
},
|
||||
"f9941": {
|
||||
"importer": "sprite-frame",
|
||||
"uuid": "d06aaaa9-662d-47e1-ac63-f2bba5eb496f@f9941",
|
||||
"displayName": "left_arrow_left_menu",
|
||||
"id": "f9941",
|
||||
"name": "spriteFrame",
|
||||
"userData": {
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0.5,
|
||||
"trimX": 0,
|
||||
"trimY": 0,
|
||||
"width": 48,
|
||||
"height": 119,
|
||||
"rawWidth": 48,
|
||||
"rawHeight": 120,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"packable": true,
|
||||
"pixelsToUnit": 100,
|
||||
"pivotX": 0.5,
|
||||
"pivotY": 0.5,
|
||||
"meshType": 0,
|
||||
"vertices": {
|
||||
"rawPosition": [
|
||||
-24,
|
||||
-59.5,
|
||||
0,
|
||||
24,
|
||||
-59.5,
|
||||
0,
|
||||
-24,
|
||||
59.5,
|
||||
0,
|
||||
24,
|
||||
59.5,
|
||||
0
|
||||
],
|
||||
"indexes": [
|
||||
0,
|
||||
1,
|
||||
2,
|
||||
2,
|
||||
1,
|
||||
3
|
||||
],
|
||||
"uv": [
|
||||
0,
|
||||
120,
|
||||
48,
|
||||
120,
|
||||
0,
|
||||
1,
|
||||
48,
|
||||
1
|
||||
],
|
||||
"nuv": [
|
||||
0,
|
||||
0.008333333333333333,
|
||||
1,
|
||||
0.008333333333333333,
|
||||
0,
|
||||
1,
|
||||
1,
|
||||
1
|
||||
],
|
||||
"minPos": [
|
||||
-24,
|
||||
-59.5,
|
||||
0
|
||||
],
|
||||
"maxPos": [
|
||||
24,
|
||||
59.5,
|
||||
0
|
||||
]
|
||||
},
|
||||
"isUuid": true,
|
||||
"imageUuidOrDatabaseUri": "d06aaaa9-662d-47e1-ac63-f2bba5eb496f@6c48a",
|
||||
"atlasUuid": ""
|
||||
},
|
||||
"ver": "1.0.12",
|
||||
"imported": true,
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {}
|
||||
}
|
||||
},
|
||||
"userData": {
|
||||
"hasAlpha": true,
|
||||
"type": "sprite-frame",
|
||||
"fixAlphaTransparencyArtifacts": false,
|
||||
"redirect": "d06aaaa9-662d-47e1-ac63-f2bba5eb496f@6c48a"
|
||||
}
|
||||
}
|
||||
BIN
assets/Sprites/menu_right_path1.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
134
assets/Sprites/menu_right_path1.png.meta
Normal file
@ -0,0 +1,134 @@
|
||||
{
|
||||
"ver": "1.0.27",
|
||||
"importer": "image",
|
||||
"imported": true,
|
||||
"uuid": "72c2576e-4ee3-4b01-ad73-5ec46fd6d0dd",
|
||||
"files": [
|
||||
".json",
|
||||
".png"
|
||||
],
|
||||
"subMetas": {
|
||||
"6c48a": {
|
||||
"importer": "texture",
|
||||
"uuid": "72c2576e-4ee3-4b01-ad73-5ec46fd6d0dd@6c48a",
|
||||
"displayName": "menu_right_path1",
|
||||
"id": "6c48a",
|
||||
"name": "texture",
|
||||
"userData": {
|
||||
"wrapModeS": "clamp-to-edge",
|
||||
"wrapModeT": "clamp-to-edge",
|
||||
"minfilter": "linear",
|
||||
"magfilter": "linear",
|
||||
"mipfilter": "none",
|
||||
"anisotropy": 0,
|
||||
"isUuid": true,
|
||||
"imageUuidOrDatabaseUri": "72c2576e-4ee3-4b01-ad73-5ec46fd6d0dd",
|
||||
"visible": false
|
||||
},
|
||||
"ver": "1.0.22",
|
||||
"imported": true,
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {}
|
||||
},
|
||||
"f9941": {
|
||||
"importer": "sprite-frame",
|
||||
"uuid": "72c2576e-4ee3-4b01-ad73-5ec46fd6d0dd@f9941",
|
||||
"displayName": "menu_right_path1",
|
||||
"id": "f9941",
|
||||
"name": "spriteFrame",
|
||||
"userData": {
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 0,
|
||||
"trimY": 0,
|
||||
"width": 48,
|
||||
"height": 120,
|
||||
"rawWidth": 48,
|
||||
"rawHeight": 120,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"packable": true,
|
||||
"pixelsToUnit": 100,
|
||||
"pivotX": 0.5,
|
||||
"pivotY": 0.5,
|
||||
"meshType": 0,
|
||||
"vertices": {
|
||||
"rawPosition": [
|
||||
-24,
|
||||
-60,
|
||||
0,
|
||||
24,
|
||||
-60,
|
||||
0,
|
||||
-24,
|
||||
60,
|
||||
0,
|
||||
24,
|
||||
60,
|
||||
0
|
||||
],
|
||||
"indexes": [
|
||||
0,
|
||||
1,
|
||||
2,
|
||||
2,
|
||||
1,
|
||||
3
|
||||
],
|
||||
"uv": [
|
||||
0,
|
||||
120,
|
||||
48,
|
||||
120,
|
||||
0,
|
||||
0,
|
||||
48,
|
||||
0
|
||||
],
|
||||
"nuv": [
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
1,
|
||||
1
|
||||
],
|
||||
"minPos": [
|
||||
-24,
|
||||
-60,
|
||||
0
|
||||
],
|
||||
"maxPos": [
|
||||
24,
|
||||
60,
|
||||
0
|
||||
]
|
||||
},
|
||||
"isUuid": true,
|
||||
"imageUuidOrDatabaseUri": "72c2576e-4ee3-4b01-ad73-5ec46fd6d0dd@6c48a",
|
||||
"atlasUuid": ""
|
||||
},
|
||||
"ver": "1.0.12",
|
||||
"imported": true,
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {}
|
||||
}
|
||||
},
|
||||
"userData": {
|
||||
"hasAlpha": true,
|
||||
"type": "sprite-frame",
|
||||
"fixAlphaTransparencyArtifacts": false,
|
||||
"redirect": "72c2576e-4ee3-4b01-ad73-5ec46fd6d0dd@6c48a"
|
||||
}
|
||||
}
|
||||
BIN
assets/Sprites/right_arrow_left_menu.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
134
assets/Sprites/right_arrow_left_menu.png.meta
Normal file
@ -0,0 +1,134 @@
|
||||
{
|
||||
"ver": "1.0.27",
|
||||
"importer": "image",
|
||||
"imported": true,
|
||||
"uuid": "7269f052-0a29-4fe5-a496-eb0042b39402",
|
||||
"files": [
|
||||
".json",
|
||||
".png"
|
||||
],
|
||||
"subMetas": {
|
||||
"6c48a": {
|
||||
"importer": "texture",
|
||||
"uuid": "7269f052-0a29-4fe5-a496-eb0042b39402@6c48a",
|
||||
"displayName": "right_arrow_left_menu",
|
||||
"id": "6c48a",
|
||||
"name": "texture",
|
||||
"userData": {
|
||||
"wrapModeS": "clamp-to-edge",
|
||||
"wrapModeT": "clamp-to-edge",
|
||||
"minfilter": "linear",
|
||||
"magfilter": "linear",
|
||||
"mipfilter": "none",
|
||||
"anisotropy": 0,
|
||||
"isUuid": true,
|
||||
"imageUuidOrDatabaseUri": "7269f052-0a29-4fe5-a496-eb0042b39402",
|
||||
"visible": false
|
||||
},
|
||||
"ver": "1.0.22",
|
||||
"imported": true,
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {}
|
||||
},
|
||||
"f9941": {
|
||||
"importer": "sprite-frame",
|
||||
"uuid": "7269f052-0a29-4fe5-a496-eb0042b39402@f9941",
|
||||
"displayName": "right_arrow_left_menu",
|
||||
"id": "f9941",
|
||||
"name": "spriteFrame",
|
||||
"userData": {
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0.5,
|
||||
"trimX": 0,
|
||||
"trimY": 0,
|
||||
"width": 48,
|
||||
"height": 119,
|
||||
"rawWidth": 48,
|
||||
"rawHeight": 120,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"packable": true,
|
||||
"pixelsToUnit": 100,
|
||||
"pivotX": 0.5,
|
||||
"pivotY": 0.5,
|
||||
"meshType": 0,
|
||||
"vertices": {
|
||||
"rawPosition": [
|
||||
-24,
|
||||
-59.5,
|
||||
0,
|
||||
24,
|
||||
-59.5,
|
||||
0,
|
||||
-24,
|
||||
59.5,
|
||||
0,
|
||||
24,
|
||||
59.5,
|
||||
0
|
||||
],
|
||||
"indexes": [
|
||||
0,
|
||||
1,
|
||||
2,
|
||||
2,
|
||||
1,
|
||||
3
|
||||
],
|
||||
"uv": [
|
||||
0,
|
||||
120,
|
||||
48,
|
||||
120,
|
||||
0,
|
||||
1,
|
||||
48,
|
||||
1
|
||||
],
|
||||
"nuv": [
|
||||
0,
|
||||
0.008333333333333333,
|
||||
1,
|
||||
0.008333333333333333,
|
||||
0,
|
||||
1,
|
||||
1,
|
||||
1
|
||||
],
|
||||
"minPos": [
|
||||
-24,
|
||||
-59.5,
|
||||
0
|
||||
],
|
||||
"maxPos": [
|
||||
24,
|
||||
59.5,
|
||||
0
|
||||
]
|
||||
},
|
||||
"isUuid": true,
|
||||
"imageUuidOrDatabaseUri": "7269f052-0a29-4fe5-a496-eb0042b39402@6c48a",
|
||||
"atlasUuid": ""
|
||||
},
|
||||
"ver": "1.0.12",
|
||||
"imported": true,
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {}
|
||||
}
|
||||
},
|
||||
"userData": {
|
||||
"hasAlpha": true,
|
||||
"type": "sprite-frame",
|
||||
"fixAlphaTransparencyArtifacts": false,
|
||||
"redirect": "7269f052-0a29-4fe5-a496-eb0042b39402@6c48a"
|
||||
}
|
||||
}
|
||||
BIN
assets/Sprites/right_arrow_right_menu.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
134
assets/Sprites/right_arrow_right_menu.png.meta
Normal file
@ -0,0 +1,134 @@
|
||||
{
|
||||
"ver": "1.0.27",
|
||||
"importer": "image",
|
||||
"imported": true,
|
||||
"uuid": "8b247509-b27c-413e-8ead-da360c3452d9",
|
||||
"files": [
|
||||
".json",
|
||||
".png"
|
||||
],
|
||||
"subMetas": {
|
||||
"6c48a": {
|
||||
"importer": "texture",
|
||||
"uuid": "8b247509-b27c-413e-8ead-da360c3452d9@6c48a",
|
||||
"displayName": "right_arrow_right_menu",
|
||||
"id": "6c48a",
|
||||
"name": "texture",
|
||||
"userData": {
|
||||
"wrapModeS": "clamp-to-edge",
|
||||
"wrapModeT": "clamp-to-edge",
|
||||
"minfilter": "linear",
|
||||
"magfilter": "linear",
|
||||
"mipfilter": "none",
|
||||
"anisotropy": 0,
|
||||
"isUuid": true,
|
||||
"imageUuidOrDatabaseUri": "8b247509-b27c-413e-8ead-da360c3452d9",
|
||||
"visible": false
|
||||
},
|
||||
"ver": "1.0.22",
|
||||
"imported": true,
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {}
|
||||
},
|
||||
"f9941": {
|
||||
"importer": "sprite-frame",
|
||||
"uuid": "8b247509-b27c-413e-8ead-da360c3452d9@f9941",
|
||||
"displayName": "right_arrow_right_menu",
|
||||
"id": "f9941",
|
||||
"name": "spriteFrame",
|
||||
"userData": {
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 0,
|
||||
"trimY": 0,
|
||||
"width": 48,
|
||||
"height": 120,
|
||||
"rawWidth": 48,
|
||||
"rawHeight": 120,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"packable": true,
|
||||
"pixelsToUnit": 100,
|
||||
"pivotX": 0.5,
|
||||
"pivotY": 0.5,
|
||||
"meshType": 0,
|
||||
"vertices": {
|
||||
"rawPosition": [
|
||||
-24,
|
||||
-60,
|
||||
0,
|
||||
24,
|
||||
-60,
|
||||
0,
|
||||
-24,
|
||||
60,
|
||||
0,
|
||||
24,
|
||||
60,
|
||||
0
|
||||
],
|
||||
"indexes": [
|
||||
0,
|
||||
1,
|
||||
2,
|
||||
2,
|
||||
1,
|
||||
3
|
||||
],
|
||||
"uv": [
|
||||
0,
|
||||
120,
|
||||
48,
|
||||
120,
|
||||
0,
|
||||
0,
|
||||
48,
|
||||
0
|
||||
],
|
||||
"nuv": [
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
1,
|
||||
1
|
||||
],
|
||||
"minPos": [
|
||||
-24,
|
||||
-60,
|
||||
0
|
||||
],
|
||||
"maxPos": [
|
||||
24,
|
||||
60,
|
||||
0
|
||||
]
|
||||
},
|
||||
"isUuid": true,
|
||||
"imageUuidOrDatabaseUri": "8b247509-b27c-413e-8ead-da360c3452d9@6c48a",
|
||||
"atlasUuid": ""
|
||||
},
|
||||
"ver": "1.0.12",
|
||||
"imported": true,
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {}
|
||||
}
|
||||
},
|
||||
"userData": {
|
||||
"hasAlpha": true,
|
||||
"type": "sprite-frame",
|
||||
"fixAlphaTransparencyArtifacts": false,
|
||||
"redirect": "8b247509-b27c-413e-8ead-da360c3452d9@6c48a"
|
||||
}
|
||||
}
|
||||
BIN
assets/Sprites/svgviewer-output(1)_path1.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
134
assets/Sprites/svgviewer-output(1)_path1.png.meta
Normal file
@ -0,0 +1,134 @@
|
||||
{
|
||||
"ver": "1.0.27",
|
||||
"importer": "image",
|
||||
"imported": true,
|
||||
"uuid": "55203563-ecf3-4957-8105-39bde6e82aa9",
|
||||
"files": [
|
||||
".json",
|
||||
".png"
|
||||
],
|
||||
"subMetas": {
|
||||
"6c48a": {
|
||||
"importer": "texture",
|
||||
"uuid": "55203563-ecf3-4957-8105-39bde6e82aa9@6c48a",
|
||||
"displayName": "svgviewer-output(1)_path1",
|
||||
"id": "6c48a",
|
||||
"name": "texture",
|
||||
"userData": {
|
||||
"wrapModeS": "clamp-to-edge",
|
||||
"wrapModeT": "clamp-to-edge",
|
||||
"minfilter": "linear",
|
||||
"magfilter": "linear",
|
||||
"mipfilter": "none",
|
||||
"anisotropy": 0,
|
||||
"isUuid": true,
|
||||
"imageUuidOrDatabaseUri": "55203563-ecf3-4957-8105-39bde6e82aa9",
|
||||
"visible": false
|
||||
},
|
||||
"ver": "1.0.22",
|
||||
"imported": true,
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {}
|
||||
},
|
||||
"f9941": {
|
||||
"importer": "sprite-frame",
|
||||
"uuid": "55203563-ecf3-4957-8105-39bde6e82aa9@f9941",
|
||||
"displayName": "svgviewer-output(1)_path1",
|
||||
"id": "f9941",
|
||||
"name": "spriteFrame",
|
||||
"userData": {
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 0,
|
||||
"trimY": 0,
|
||||
"width": 48,
|
||||
"height": 120,
|
||||
"rawWidth": 48,
|
||||
"rawHeight": 120,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"packable": true,
|
||||
"pixelsToUnit": 100,
|
||||
"pivotX": 0.5,
|
||||
"pivotY": 0.5,
|
||||
"meshType": 0,
|
||||
"vertices": {
|
||||
"rawPosition": [
|
||||
-24,
|
||||
-60,
|
||||
0,
|
||||
24,
|
||||
-60,
|
||||
0,
|
||||
-24,
|
||||
60,
|
||||
0,
|
||||
24,
|
||||
60,
|
||||
0
|
||||
],
|
||||
"indexes": [
|
||||
0,
|
||||
1,
|
||||
2,
|
||||
2,
|
||||
1,
|
||||
3
|
||||
],
|
||||
"uv": [
|
||||
0,
|
||||
120,
|
||||
48,
|
||||
120,
|
||||
0,
|
||||
0,
|
||||
48,
|
||||
0
|
||||
],
|
||||
"nuv": [
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
1,
|
||||
1
|
||||
],
|
||||
"minPos": [
|
||||
-24,
|
||||
-60,
|
||||
0
|
||||
],
|
||||
"maxPos": [
|
||||
24,
|
||||
60,
|
||||
0
|
||||
]
|
||||
},
|
||||
"isUuid": true,
|
||||
"imageUuidOrDatabaseUri": "55203563-ecf3-4957-8105-39bde6e82aa9@6c48a",
|
||||
"atlasUuid": ""
|
||||
},
|
||||
"ver": "1.0.12",
|
||||
"imported": true,
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {}
|
||||
}
|
||||
},
|
||||
"userData": {
|
||||
"hasAlpha": true,
|
||||
"type": "sprite-frame",
|
||||
"fixAlphaTransparencyArtifacts": false,
|
||||
"redirect": "55203563-ecf3-4957-8105-39bde6e82aa9@6c48a"
|
||||
}
|
||||
}
|
||||
BIN
assets/Sprites/квадрат_с_нижней_линией.png
Normal file
|
After Width: | Height: | Size: 207 B |
134
assets/Sprites/квадрат_с_нижней_линией.png.meta
Normal file
@ -0,0 +1,134 @@
|
||||
{
|
||||
"ver": "1.0.27",
|
||||
"importer": "image",
|
||||
"imported": true,
|
||||
"uuid": "987794f8-c597-4400-9d3b-2849b7110099",
|
||||
"files": [
|
||||
".json",
|
||||
".png"
|
||||
],
|
||||
"subMetas": {
|
||||
"6c48a": {
|
||||
"importer": "texture",
|
||||
"uuid": "987794f8-c597-4400-9d3b-2849b7110099@6c48a",
|
||||
"displayName": "квадрат_с_нижней_линией",
|
||||
"id": "6c48a",
|
||||
"name": "texture",
|
||||
"userData": {
|
||||
"wrapModeS": "clamp-to-edge",
|
||||
"wrapModeT": "clamp-to-edge",
|
||||
"minfilter": "linear",
|
||||
"magfilter": "linear",
|
||||
"mipfilter": "none",
|
||||
"anisotropy": 0,
|
||||
"isUuid": true,
|
||||
"imageUuidOrDatabaseUri": "987794f8-c597-4400-9d3b-2849b7110099",
|
||||
"visible": false
|
||||
},
|
||||
"ver": "1.0.22",
|
||||
"imported": true,
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {}
|
||||
},
|
||||
"f9941": {
|
||||
"importer": "sprite-frame",
|
||||
"uuid": "987794f8-c597-4400-9d3b-2849b7110099@f9941",
|
||||
"displayName": "квадрат_с_нижней_линией",
|
||||
"id": "f9941",
|
||||
"name": "spriteFrame",
|
||||
"userData": {
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 0,
|
||||
"trimY": 0,
|
||||
"width": 48,
|
||||
"height": 48,
|
||||
"rawWidth": 48,
|
||||
"rawHeight": 48,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"packable": true,
|
||||
"pixelsToUnit": 100,
|
||||
"pivotX": 0.5,
|
||||
"pivotY": 0.5,
|
||||
"meshType": 0,
|
||||
"vertices": {
|
||||
"rawPosition": [
|
||||
-24,
|
||||
-24,
|
||||
0,
|
||||
24,
|
||||
-24,
|
||||
0,
|
||||
-24,
|
||||
24,
|
||||
0,
|
||||
24,
|
||||
24,
|
||||
0
|
||||
],
|
||||
"indexes": [
|
||||
0,
|
||||
1,
|
||||
2,
|
||||
2,
|
||||
1,
|
||||
3
|
||||
],
|
||||
"uv": [
|
||||
0,
|
||||
48,
|
||||
48,
|
||||
48,
|
||||
0,
|
||||
0,
|
||||
48,
|
||||
0
|
||||
],
|
||||
"nuv": [
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
1,
|
||||
1
|
||||
],
|
||||
"minPos": [
|
||||
-24,
|
||||
-24,
|
||||
0
|
||||
],
|
||||
"maxPos": [
|
||||
24,
|
||||
24,
|
||||
0
|
||||
]
|
||||
},
|
||||
"isUuid": true,
|
||||
"imageUuidOrDatabaseUri": "987794f8-c597-4400-9d3b-2849b7110099@6c48a",
|
||||
"atlasUuid": ""
|
||||
},
|
||||
"ver": "1.0.12",
|
||||
"imported": true,
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {}
|
||||
}
|
||||
},
|
||||
"userData": {
|
||||
"hasAlpha": true,
|
||||
"type": "sprite-frame",
|
||||
"fixAlphaTransparencyArtifacts": false,
|
||||
"redirect": "987794f8-c597-4400-9d3b-2849b7110099@6c48a"
|
||||
}
|
||||
}
|
||||
BIN
settings/Animation Smile GIF by renderfruit.png
Normal file
|
After Width: | Height: | Size: 238 KiB |
BIN
settings/logo2vnuzu(1).png
Normal file
|
After Width: | Height: | Size: 918 KiB |
BIN
settings/logoinit.png
Normal file
|
After Width: | Height: | Size: 297 KiB |
@ -3,16 +3,10 @@
|
||||
"splash-setting": {
|
||||
"background": {
|
||||
"type": "custom",
|
||||
"image": "project://settings/taltek-01.jpg",
|
||||
"color": {
|
||||
"x": 0.08235294117647059,
|
||||
"y": 0.16470588235294117,
|
||||
"z": 0.0784313725490196,
|
||||
"w": 0.4588235294117647
|
||||
}
|
||||
"image": "project://settings/taltek-01.jpg"
|
||||
},
|
||||
"logo": {
|
||||
"image": "project://settings/logo2vnuzu.png",
|
||||
"image": "project://settings/logoinit.png",
|
||||
"type": "custom"
|
||||
}
|
||||
}
|
||||
|
||||
@ -7,5 +7,6 @@
|
||||
"legacyFbxImporter": {
|
||||
"visible": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"custom_joint_texture_layouts": []
|
||||
}
|
||||
|
||||