mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-09-26 10:16:14 +00:00
update
This commit is contained in:
9
JisolGameCocos/assets/res/UI.meta
Normal file
9
JisolGameCocos/assets/res/UI.meta
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "1.2.0",
|
||||
"importer": "directory",
|
||||
"imported": true,
|
||||
"uuid": "8aad49c8-3dce-4946-aed9-9204e08a3372",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
9
JisolGameCocos/assets/res/UI/Loading.meta
Normal file
9
JisolGameCocos/assets/res/UI/Loading.meta
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "1.2.0",
|
||||
"importer": "directory",
|
||||
"imported": true,
|
||||
"uuid": "be07960d-4bad-475c-8cd8-893ed0557a99",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
BIN
JisolGameCocos/assets/res/UI/Loading/bg.png
Normal file
BIN
JisolGameCocos/assets/res/UI/Loading/bg.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 81 KiB |
134
JisolGameCocos/assets/res/UI/Loading/bg.png.meta
Normal file
134
JisolGameCocos/assets/res/UI/Loading/bg.png.meta
Normal file
@@ -0,0 +1,134 @@
|
||||
{
|
||||
"ver": "1.0.26",
|
||||
"importer": "image",
|
||||
"imported": true,
|
||||
"uuid": "76aadab4-10a3-4c8e-b4b9-dce7807050fc",
|
||||
"files": [
|
||||
".json",
|
||||
".png"
|
||||
],
|
||||
"subMetas": {
|
||||
"6c48a": {
|
||||
"importer": "texture",
|
||||
"uuid": "76aadab4-10a3-4c8e-b4b9-dce7807050fc@6c48a",
|
||||
"displayName": "bg",
|
||||
"id": "6c48a",
|
||||
"name": "texture",
|
||||
"userData": {
|
||||
"wrapModeS": "clamp-to-edge",
|
||||
"wrapModeT": "clamp-to-edge",
|
||||
"imageUuidOrDatabaseUri": "76aadab4-10a3-4c8e-b4b9-dce7807050fc",
|
||||
"isUuid": true,
|
||||
"visible": false,
|
||||
"minfilter": "linear",
|
||||
"magfilter": "linear",
|
||||
"mipfilter": "none",
|
||||
"anisotropy": 0
|
||||
},
|
||||
"ver": "1.0.22",
|
||||
"imported": true,
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {}
|
||||
},
|
||||
"f9941": {
|
||||
"importer": "sprite-frame",
|
||||
"uuid": "76aadab4-10a3-4c8e-b4b9-dce7807050fc@f9941",
|
||||
"displayName": "bg",
|
||||
"id": "f9941",
|
||||
"name": "spriteFrame",
|
||||
"userData": {
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 0,
|
||||
"trimY": 0,
|
||||
"width": 658,
|
||||
"height": 1425,
|
||||
"rawWidth": 658,
|
||||
"rawHeight": 1425,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"packable": true,
|
||||
"pixelsToUnit": 100,
|
||||
"pivotX": 0.5,
|
||||
"pivotY": 0.5,
|
||||
"meshType": 0,
|
||||
"vertices": {
|
||||
"rawPosition": [
|
||||
-329,
|
||||
-712.5,
|
||||
0,
|
||||
329,
|
||||
-712.5,
|
||||
0,
|
||||
-329,
|
||||
712.5,
|
||||
0,
|
||||
329,
|
||||
712.5,
|
||||
0
|
||||
],
|
||||
"indexes": [
|
||||
0,
|
||||
1,
|
||||
2,
|
||||
2,
|
||||
1,
|
||||
3
|
||||
],
|
||||
"uv": [
|
||||
0,
|
||||
1425,
|
||||
658,
|
||||
1425,
|
||||
0,
|
||||
0,
|
||||
658,
|
||||
0
|
||||
],
|
||||
"nuv": [
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
1,
|
||||
1
|
||||
],
|
||||
"minPos": [
|
||||
-329,
|
||||
-712.5,
|
||||
0
|
||||
],
|
||||
"maxPos": [
|
||||
329,
|
||||
712.5,
|
||||
0
|
||||
]
|
||||
},
|
||||
"isUuid": true,
|
||||
"imageUuidOrDatabaseUri": "76aadab4-10a3-4c8e-b4b9-dce7807050fc@6c48a",
|
||||
"atlasUuid": ""
|
||||
},
|
||||
"ver": "1.0.12",
|
||||
"imported": true,
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {}
|
||||
}
|
||||
},
|
||||
"userData": {
|
||||
"type": "sprite-frame",
|
||||
"hasAlpha": false,
|
||||
"fixAlphaTransparencyArtifacts": false,
|
||||
"redirect": "76aadab4-10a3-4c8e-b4b9-dce7807050fc@f9941"
|
||||
}
|
||||
}
|
@@ -63,7 +63,7 @@
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"x": 720,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
@@ -3095,8 +3095,8 @@
|
||||
},
|
||||
"_alignFlags": 45,
|
||||
"_target": null,
|
||||
"_left": 0,
|
||||
"_right": 0,
|
||||
"_left": 720,
|
||||
"_right": -720,
|
||||
"_top": 0,
|
||||
"_bottom": 0,
|
||||
"_horizontalCenter": 0,
|
||||
|
9
JisolGameCocos/assets/resources/prefab/ui/Loading.meta
Normal file
9
JisolGameCocos/assets/resources/prefab/ui/Loading.meta
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "1.2.0",
|
||||
"importer": "directory",
|
||||
"imported": true,
|
||||
"uuid": "8a40f59c-0b6f-4904-9a13-29d84a8c03c7",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
@@ -0,0 +1,819 @@
|
||||
[
|
||||
{
|
||||
"__type__": "cc.Prefab",
|
||||
"_name": "LoadingView",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_native": "",
|
||||
"data": {
|
||||
"__id__": 1
|
||||
},
|
||||
"optimizationPolicy": 0,
|
||||
"persistent": false
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "LoadingView",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_parent": null,
|
||||
"_children": [
|
||||
{
|
||||
"__id__": 2
|
||||
},
|
||||
{
|
||||
"__id__": 10
|
||||
},
|
||||
{
|
||||
"__id__": 18
|
||||
}
|
||||
],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 32
|
||||
},
|
||||
{
|
||||
"__id__": 34
|
||||
},
|
||||
{
|
||||
"__id__": 36
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 38
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 720,
|
||||
"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.Node",
|
||||
"_name": "bg",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_parent": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 3
|
||||
},
|
||||
{
|
||||
"__id__": 5
|
||||
},
|
||||
{
|
||||
"__id__": 7
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 9
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 135,
|
||||
"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__": 2
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 4
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 720,
|
||||
"height": 1550
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5,
|
||||
"y": 0.5
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "8ftYzn1eBL/KI9lfvctDGE"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Sprite",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 2
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 6
|
||||
},
|
||||
"_customMaterial": null,
|
||||
"_srcBlendFactor": 2,
|
||||
"_dstBlendFactor": 4,
|
||||
"_color": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 255,
|
||||
"g": 255,
|
||||
"b": 255,
|
||||
"a": 255
|
||||
},
|
||||
"_spriteFrame": {
|
||||
"__uuid__": "76aadab4-10a3-4c8e-b4b9-dce7807050fc@f9941",
|
||||
"__expectedType__": "cc.SpriteFrame"
|
||||
},
|
||||
"_type": 0,
|
||||
"_fillType": 0,
|
||||
"_sizeMode": 0,
|
||||
"_fillCenter": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"_fillStart": 0,
|
||||
"_fillRange": 0,
|
||||
"_isTrimmedMode": true,
|
||||
"_useGrayscale": false,
|
||||
"_atlas": null,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "72OG0M5ThEtaIaziixD4R1"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Widget",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 2
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 8
|
||||
},
|
||||
"_alignFlags": 44,
|
||||
"_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": 658,
|
||||
"_originalHeight": 0,
|
||||
"_alignMode": 2,
|
||||
"_lockFlags": 0,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "e3DwW2DJVFXZGua4BUjaXa"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 1
|
||||
},
|
||||
"asset": {
|
||||
"__id__": 0
|
||||
},
|
||||
"fileId": "85bQbPz7FPkaRPL/kSAwAE",
|
||||
"instance": null,
|
||||
"targetOverrides": null,
|
||||
"nestedPrefabInstanceRoots": null
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "Label",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_parent": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 11
|
||||
},
|
||||
{
|
||||
"__id__": 13
|
||||
},
|
||||
{
|
||||
"__id__": 15
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 17
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": -404.685,
|
||||
"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": 150,
|
||||
"height": 56.4
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5,
|
||||
"y": 0.5
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "21zdTy8pVIQp5pY9vm9NHt"
|
||||
},
|
||||
{
|
||||
"__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": 255,
|
||||
"g": 255,
|
||||
"b": 255,
|
||||
"a": 255
|
||||
},
|
||||
"_string": "加载内容",
|
||||
"_horizontalAlign": 1,
|
||||
"_verticalAlign": 1,
|
||||
"_actualFontSize": 36,
|
||||
"_fontSize": 36,
|
||||
"_fontFamily": "Arial",
|
||||
"_lineHeight": 40,
|
||||
"_overflow": 0,
|
||||
"_enableWrapText": true,
|
||||
"_font": null,
|
||||
"_isSystemFontUsed": true,
|
||||
"_spacingX": 0,
|
||||
"_isItalic": false,
|
||||
"_isBold": true,
|
||||
"_isUnderline": false,
|
||||
"_underlineHeight": 2,
|
||||
"_cacheMode": 0,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "d7LX6grh1E27UHz++aE7kC"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.LabelOutline",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 10
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 16
|
||||
},
|
||||
"_color": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 0,
|
||||
"g": 0,
|
||||
"b": 0,
|
||||
"a": 255
|
||||
},
|
||||
"_width": 3,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "24TEBL9uJClqHJ/C8FqV7L"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 1
|
||||
},
|
||||
"asset": {
|
||||
"__id__": 0
|
||||
},
|
||||
"fileId": "25K8+LWY1HabU67cx0nsVl",
|
||||
"instance": null,
|
||||
"targetOverrides": null,
|
||||
"nestedPrefabInstanceRoots": null
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "ProgressBar",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_parent": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_children": [
|
||||
{
|
||||
"__id__": 19
|
||||
}
|
||||
],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 25
|
||||
},
|
||||
{
|
||||
"__id__": 27
|
||||
},
|
||||
{
|
||||
"__id__": 29
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 31
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": -459.803,
|
||||
"z": 0
|
||||
},
|
||||
"_lrot": {
|
||||
"__type__": "cc.Quat",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0,
|
||||
"w": 1
|
||||
},
|
||||
"_lscale": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 2,
|
||||
"y": 2,
|
||||
"z": 1
|
||||
},
|
||||
"_mobility": 0,
|
||||
"_layer": 33554432,
|
||||
"_euler": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "Bar",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_parent": {
|
||||
"__id__": 18
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 20
|
||||
},
|
||||
{
|
||||
"__id__": 22
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 24
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": -150,
|
||||
"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__": 19
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 21
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 0,
|
||||
"height": 15
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0,
|
||||
"y": 0.5
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "26DgYhzC1A2rETR6Y5uuLm"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Sprite",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 19
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 23
|
||||
},
|
||||
"_customMaterial": null,
|
||||
"_srcBlendFactor": 2,
|
||||
"_dstBlendFactor": 4,
|
||||
"_color": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 65,
|
||||
"g": 141,
|
||||
"b": 255,
|
||||
"a": 255
|
||||
},
|
||||
"_spriteFrame": {
|
||||
"__uuid__": "24a704da-2867-446d-8d1a-5e920c75e09d@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": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "01ztTBgsZOFoYCTwqE1l3J"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 1
|
||||
},
|
||||
"asset": {
|
||||
"__id__": 0
|
||||
},
|
||||
"fileId": "57+wn/Ye1PlrYILhPjajwO",
|
||||
"instance": null,
|
||||
"targetOverrides": null,
|
||||
"nestedPrefabInstanceRoots": null
|
||||
},
|
||||
{
|
||||
"__type__": "cc.UITransform",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 18
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 26
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 300,
|
||||
"height": 15
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5,
|
||||
"y": 0.5
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "cc0fFjhwhMGaRQ0ubiGlqz"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Sprite",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 18
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 28
|
||||
},
|
||||
"_customMaterial": null,
|
||||
"_srcBlendFactor": 2,
|
||||
"_dstBlendFactor": 4,
|
||||
"_color": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 209,
|
||||
"g": 225,
|
||||
"b": 255,
|
||||
"a": 255
|
||||
},
|
||||
"_spriteFrame": {
|
||||
"__uuid__": "24a704da-2867-446d-8d1a-5e920c75e09d@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": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "08q3gyRnNAXIdO7LfY62fu"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.ProgressBar",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 18
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 30
|
||||
},
|
||||
"_barSprite": {
|
||||
"__id__": 22
|
||||
},
|
||||
"_mode": 0,
|
||||
"_totalLength": 300,
|
||||
"_progress": 0,
|
||||
"_reverse": false,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "2e2r1+eohH14TzfL+WHlxX"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 1
|
||||
},
|
||||
"asset": {
|
||||
"__id__": 0
|
||||
},
|
||||
"fileId": "85RG8ssvJFB5oVHXPtWTfF",
|
||||
"instance": null,
|
||||
"targetOverrides": null,
|
||||
"nestedPrefabInstanceRoots": null
|
||||
},
|
||||
{
|
||||
"__type__": "cc.UITransform",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 33
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 720,
|
||||
"height": 1280
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5,
|
||||
"y": 0.5
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "1dgJxmIH5HIpXD6y0/xMwI"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Widget",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 35
|
||||
},
|
||||
"_alignFlags": 45,
|
||||
"_target": null,
|
||||
"_left": 720,
|
||||
"_right": -720,
|
||||
"_top": 0,
|
||||
"_bottom": 0,
|
||||
"_horizontalCenter": 0,
|
||||
"_verticalCenter": 0,
|
||||
"_isAbsLeft": true,
|
||||
"_isAbsRight": true,
|
||||
"_isAbsTop": true,
|
||||
"_isAbsBottom": true,
|
||||
"_isAbsHorizontalCenter": true,
|
||||
"_isAbsVerticalCenter": true,
|
||||
"_originalWidth": 100,
|
||||
"_originalHeight": 100,
|
||||
"_alignMode": 2,
|
||||
"_lockFlags": 0,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "582zBz6m5DKqmkTkiS/LE0"
|
||||
},
|
||||
{
|
||||
"__type__": "7b00a/4yERL/LgI4ZobxPAs",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 37
|
||||
},
|
||||
"progress": {
|
||||
"__id__": 29
|
||||
},
|
||||
"label": {
|
||||
"__id__": 13
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "61l1724zhJtZN7fgUUejH7"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 1
|
||||
},
|
||||
"asset": {
|
||||
"__id__": 0
|
||||
},
|
||||
"fileId": "08xLpDDa9NlK3pgR7XiOqb",
|
||||
"instance": null,
|
||||
"targetOverrides": null
|
||||
}
|
||||
]
|
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"ver": "1.1.49",
|
||||
"importer": "prefab",
|
||||
"imported": true,
|
||||
"uuid": "ab7f7687-54ad-4afe-9362-646727942569",
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {},
|
||||
"userData": {
|
||||
"syncNodeName": "LoadingView"
|
||||
}
|
||||
}
|
@@ -25,6 +25,7 @@ import { TableGRoleAttackEffect } from "../resources/config/ts/TableGRoleAttackE
|
||||
import { TableGRoleSkill } from "../resources/config/ts/TableGRoleSkill";
|
||||
import { TableGRoleSkillEffect } from "../resources/config/ts/TableGRoleSkillEffect";
|
||||
import { TableGMap } from "../resources/config/ts/TableGMap";
|
||||
import Loading from "../../extensions/ngame/assets/ngame/util/Loading";
|
||||
|
||||
let IP = "kyu.jisol.cn";
|
||||
|
||||
@@ -106,6 +107,8 @@ export abstract class JNGSyncProtoBase<T> extends JNSyncFrameProtoComponent<T>{
|
||||
//读写config
|
||||
export class JNGConfig extends SystemBase{
|
||||
|
||||
static loading = "JNGConfig";
|
||||
|
||||
//配置JSON加载
|
||||
jsons:JsonLoad[] = [
|
||||
{name:TableGRole.TableName}, //角色
|
||||
@@ -124,25 +127,40 @@ export class JNGConfig extends SystemBase{
|
||||
});
|
||||
|
||||
async onInit(): Promise<any> {
|
||||
|
||||
app.loading.setCurrent(JNGConfig.loading);
|
||||
|
||||
for (const key in this.jsons) {
|
||||
const load = this.jsons[key];
|
||||
await JsonUtil.load(load);
|
||||
}
|
||||
|
||||
app.loading.ok(JNGConfig.loading);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//角色初始器
|
||||
export class JLoaderRole extends JLoaderSystem{
|
||||
//资源初始器
|
||||
export class JLoaderBattle extends JLoaderSystem{
|
||||
|
||||
static loading = "JLoaderBattle";
|
||||
static loadingInit = "JLoaderBattle_Init";
|
||||
|
||||
skData:{[id:number]:sp.SkeletonData} = {}; //角色Spine
|
||||
bullets:{[id:number]:SpriteFrame} = {};
|
||||
bullets:{[id:number]:SpriteFrame} = {}; //子弹
|
||||
effects:{[id:number]:sp.SkeletonData} = {}; //Spine特效
|
||||
maps:{[id:number]:SpriteFrame[]} = {}; //地图
|
||||
|
||||
async onInit(): Promise<any> {
|
||||
|
||||
app.loading.setCurrent(JLoaderBattle.loading);
|
||||
|
||||
await super.onInit();
|
||||
|
||||
app.loading.ok(JLoaderBattle.loading);
|
||||
|
||||
app.loading.setCurrent(JLoaderBattle.loadingInit);
|
||||
|
||||
//将配置表的角色都读取出来
|
||||
for (const info of Object.values(TableGRole.getAllConfig())) {
|
||||
this.skData[info.id] = await (new Promise(r => {
|
||||
@@ -193,6 +211,8 @@ export class JLoaderRole extends JLoaderSystem{
|
||||
})))
|
||||
|
||||
}
|
||||
|
||||
app.loading.ok(JLoaderBattle.loadingInit);
|
||||
|
||||
}
|
||||
|
||||
@@ -208,6 +228,11 @@ export const app = {
|
||||
baseURL: `http://${IP}:8080`,
|
||||
}), //请求
|
||||
battle : GBattleModeManager.getIns(), //战斗
|
||||
config : new JNGConfig(),
|
||||
battleRes : new JLoaderRole("battle"), //battle包
|
||||
config : new JNGConfig(), //配置文件
|
||||
battleRes : new JLoaderBattle("battle"), //battle包
|
||||
loading: new Loading({
|
||||
[JNGConfig.loading]:{title:"加载配置文件"},
|
||||
[JLoaderBattle.loading]:{title:"加载战斗资源"},
|
||||
[JLoaderBattle.loadingInit]:{title:"初始化战斗资源"},
|
||||
})
|
||||
}
|
@@ -16,6 +16,9 @@ export class Main extends Component {
|
||||
|
||||
async onLoad(){
|
||||
|
||||
// 创建UI
|
||||
director.getScene().addChild(instantiate(this.UIPrefab));
|
||||
|
||||
//加载 APP
|
||||
await JNGame.Init(app,[
|
||||
{path:"proto/GDemo"}
|
||||
@@ -26,10 +29,8 @@ export class Main extends Component {
|
||||
//发生帧同步开始
|
||||
app.socket.Send(JNSyncAction.NSyncFrameStart);
|
||||
|
||||
// 创建UI
|
||||
director.getScene().addChild(instantiate(this.UIPrefab));
|
||||
// 创建世界
|
||||
director.getScene().addChild(instantiate(this.WorldPrefab));
|
||||
// director.getScene().addChild(instantiate(this.WorldPrefab));
|
||||
|
||||
}
|
||||
|
||||
|
@@ -14,8 +14,8 @@ export class UICanvas extends Component {
|
||||
//绑定层级
|
||||
app.layer.bind(this.root);
|
||||
|
||||
//显示Home
|
||||
app.layer.Open(GUI.Home);
|
||||
//显示Loading
|
||||
app.layer.Open(GUI.Loading);
|
||||
|
||||
}
|
||||
|
||||
|
@@ -97,6 +97,9 @@ export default class GOnHookMode extends GBaseMode<{}>{
|
||||
|
||||
fsm:GFSMOnHookMode;
|
||||
|
||||
//是否允许攻击
|
||||
isAllowAttack:boolean = false;
|
||||
|
||||
onSyncInitSuccess():void{
|
||||
|
||||
//初始化战斗
|
||||
@@ -146,8 +149,13 @@ export default class GOnHookMode extends GBaseMode<{}>{
|
||||
onUpdateCamera(dt:number){
|
||||
|
||||
//如果没有敌人相机永远锁定最前面的宠物
|
||||
if(!this.isHaveEnemy()){
|
||||
if(this.isAllowAttack && this.isHaveEnemy()){
|
||||
|
||||
//如果有敌人则移动到战斗位置
|
||||
let cameraWorld = this.camera.node.worldPosition.clone();
|
||||
this.camera.node.worldPosition = cameraWorld.lerp(v3(this.nextFightX,cameraWorld.y,cameraWorld.z),(dt / 1000));
|
||||
|
||||
}else{
|
||||
//获取冲到最前面的宠物
|
||||
let roles = this.getOnesRoleAlive(GOnHookModePlayerEnum.PLAYER);
|
||||
let frontRole = roles.sort((role1,role2) => role2.v2World.x - role1.v2World.x)[0];
|
||||
@@ -156,11 +164,6 @@ export default class GOnHookMode extends GBaseMode<{}>{
|
||||
//设置相机 位置
|
||||
let cameraWorld = this.camera.node.worldPosition.clone();
|
||||
this.camera.node.worldPosition = cameraWorld.lerp(v3(frontRole.v2World.x,cameraWorld.y,cameraWorld.z),(dt / 1000));
|
||||
|
||||
}else{
|
||||
//如果有敌人则移动到战斗位置
|
||||
let cameraWorld = this.camera.node.worldPosition.clone();
|
||||
this.camera.node.worldPosition = cameraWorld.lerp(v3(this.nextFightX,cameraWorld.y,cameraWorld.z),(dt / 1000));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -210,6 +213,8 @@ export default class GOnHookMode extends GBaseMode<{}>{
|
||||
//获取敌人
|
||||
getEnumy(player:GRoleDefault,type:GOnHookModePlayerEnum):GRoleDefault{
|
||||
|
||||
if(!this.isAllowAttack) return null;
|
||||
|
||||
let enumyOnes = GOnHookModePlayerEnum.ENEMY
|
||||
//如果是ENEMY 则 它的敌人是 PLAYER
|
||||
if(type == GOnHookModePlayerEnum.ENEMY) enumyOnes = GOnHookModePlayerEnum.PLAYER
|
||||
@@ -253,6 +258,7 @@ export default class GOnHookMode extends GBaseMode<{}>{
|
||||
|
||||
//是否有怪物
|
||||
isHaveEnemy(){
|
||||
if(!this.isAllowAttack) return [];
|
||||
return this.getOnesRoleAlive(GOnHookModePlayerEnum.ENEMY).filter(role => !!role.get()).length > 0;
|
||||
}
|
||||
|
||||
|
@@ -32,18 +32,18 @@ export default class GFSMOnHookMode extends GFSMBase{
|
||||
title:"生成下一个战斗位置",
|
||||
mode:GFSMProcessMode.Execute,
|
||||
execute: this.onGenNextFightProcess.bind(this),
|
||||
to:[ProcessEnum.LeaveFight]
|
||||
},
|
||||
[ProcessEnum.LeaveFight]:{
|
||||
title:"前往战斗",
|
||||
mode:GFSMProcessMode.WaitExecute,
|
||||
execute: this.onLeaveFightProcess.bind(this),
|
||||
to:[ProcessEnum.GenEnemy]
|
||||
},
|
||||
[ProcessEnum.GenEnemy]:{
|
||||
title:"生成敌人",
|
||||
mode:GFSMProcessMode.Execute,
|
||||
execute: this.onGenEnemyProcess.bind(this),
|
||||
to:[ProcessEnum.LeaveFight]
|
||||
},
|
||||
[ProcessEnum.LeaveFight]:{
|
||||
title:"前往战斗",
|
||||
mode:GFSMProcessMode.WaitExecute,
|
||||
execute: this.onLeaveFightProcess.bind(this),
|
||||
to:[ProcessEnum.Fight]
|
||||
},
|
||||
[ProcessEnum.Fight]:{
|
||||
@@ -69,11 +69,21 @@ export default class GFSMOnHookMode extends GFSMBase{
|
||||
//生成下一个战斗位置
|
||||
onGenNextFightProcess(){
|
||||
|
||||
this.mode.isAllowAttack = false;
|
||||
this.mode.onNextTarget();
|
||||
return ProcessEnum.LeaveFight; //前往战斗位置
|
||||
return ProcessEnum.GenEnemy; //生成敌人
|
||||
|
||||
}
|
||||
|
||||
//生成敌人
|
||||
onGenEnemyProcess(){
|
||||
|
||||
this.mode.onResetGenerateEnemy();
|
||||
return ProcessEnum.LeaveFight; //前往战斗
|
||||
|
||||
}
|
||||
|
||||
|
||||
//前往战斗
|
||||
onLeaveFightProcess(){
|
||||
|
||||
@@ -90,22 +100,15 @@ export default class GFSMOnHookMode extends GFSMBase{
|
||||
}
|
||||
|
||||
//到达位置生成敌人
|
||||
return ProcessEnum.GenEnemy;
|
||||
|
||||
}
|
||||
|
||||
//生成敌人
|
||||
onGenEnemyProcess(){
|
||||
|
||||
this.mode.onResetGenerateEnemy();
|
||||
return ProcessEnum.Fight;
|
||||
|
||||
}
|
||||
|
||||
|
||||
//战斗
|
||||
onFightProcess(){
|
||||
|
||||
|
||||
this.mode.isAllowAttack = true;
|
||||
//等待敌人击杀完
|
||||
if(!(this.mode.isHaveEnemy())){
|
||||
return ProcessEnum.SeekEnemy; //击杀完寻找敌人
|
||||
|
9
JisolGameCocos/assets/script/ui/Loading.meta
Normal file
9
JisolGameCocos/assets/script/ui/Loading.meta
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "1.2.0",
|
||||
"importer": "directory",
|
||||
"imported": true,
|
||||
"uuid": "65c8ddaf-bdfa-4c52-bcef-f952bf687165",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
39
JisolGameCocos/assets/script/ui/Loading/LoadingView.ts
Normal file
39
JisolGameCocos/assets/script/ui/Loading/LoadingView.ts
Normal file
@@ -0,0 +1,39 @@
|
||||
import { ProgressBar } from "cc";
|
||||
import { _decorator } from "cc";
|
||||
import { JNGLayerBase, app } from "../../App";
|
||||
import { Label } from "cc";
|
||||
import { GUI } from "../UIConfig";
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@ccclass('LoadingView')
|
||||
export default class LoadingView extends JNGLayerBase {
|
||||
|
||||
@property(ProgressBar)
|
||||
progress:ProgressBar;
|
||||
|
||||
@property(Label)
|
||||
label:Label;
|
||||
|
||||
//是否加载成功
|
||||
isOk:boolean = false;
|
||||
|
||||
update(dt:number){
|
||||
if(app.loading.getCurrentInfo())
|
||||
this.label.string = app.loading.getCurrentInfo().title;
|
||||
this.progress.progress = app.loading.progress();
|
||||
if(!this.isOk && app.loading.isAllSuccess()){
|
||||
this.isOk = true;
|
||||
this.onSuccess();
|
||||
}
|
||||
}
|
||||
|
||||
async onSuccess(){
|
||||
|
||||
//打开主页
|
||||
await app.layer.Open(GUI.Home);
|
||||
//关闭加载页
|
||||
app.layer.Close(GUI.Loading);
|
||||
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "4.0.23",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "7b00aff8-c844-4bfc-b808-e19a1bc4f02c",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
@@ -1,14 +1,33 @@
|
||||
import { JNLayerInfo } from "../../../extensions/ngame/assets/ngame/ui/JNLayer";
|
||||
import { v3 } from "cc";
|
||||
import { JNLayerAnim, JNLayerInfo } from "../../../extensions/ngame/assets/ngame/ui/JNLayer";
|
||||
|
||||
export enum GLayer{
|
||||
View = "View",
|
||||
}
|
||||
|
||||
export enum GUI{
|
||||
Loading = "Loading",
|
||||
Home = "Home",
|
||||
}
|
||||
|
||||
export const UIConfig:{ [key: string]: JNLayerInfo; } = {
|
||||
[GUI.Home]:{ layer:GLayer.View, uri: "prefab/ui/Home/HomeView"}
|
||||
[GUI.Loading]:{
|
||||
layer:GLayer.View,
|
||||
uri: "prefab/ui/Loading/LoadingView",
|
||||
anims:{
|
||||
back:JNLayerAnim.Smaller,
|
||||
backInfo:{key:"position",start:v3(0,0,0),end:v3(-720,0,0)}
|
||||
},
|
||||
},
|
||||
[GUI.Home]:{
|
||||
layer:GLayer.View,
|
||||
uri: "prefab/ui/Home/HomeView",
|
||||
anims:{
|
||||
front:JNLayerAnim.Enlarge,
|
||||
back:JNLayerAnim.Smaller,
|
||||
frontInfo:{key:"position",start:v3(720,0,0),end:v3(0,0,0)},
|
||||
backInfo:{key:"position",start:v3(0,0,0),end:v3(-720,0,0)}
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
|
@@ -16,7 +16,7 @@ const excel = require('exceljs');
|
||||
* @param {*} name excel文件名
|
||||
* @param {*} isClient 是否为客户端数据
|
||||
*/
|
||||
async function convert(src, dst, name, isClient) {
|
||||
async function convert(src, dst, name, isClient,outLocalJsonPath) {
|
||||
let r = {};
|
||||
let names = []; // 文名字段名
|
||||
let keys = []; // 字段名
|
||||
@@ -282,11 +282,14 @@ async function convert(src, dst, name, isClient) {
|
||||
});
|
||||
// 写入流
|
||||
if (r["undefined"] == null) {
|
||||
|
||||
await fs.writeFileSync(dst, JSON.stringify(r));
|
||||
await fs.writeFileSync(outLocalJsonPath, JSON.stringify(r));
|
||||
// 生成客户端脚本
|
||||
if (isClient)
|
||||
(0, JsonToTs_1.createTs)(name, types_client, r, primary);
|
||||
console.log(isClient ? "客户端数据" : "服务器数据", "生成成功", dst);
|
||||
|
||||
}
|
||||
else {
|
||||
console.warn(isClient ? "客户端数据" : "服务器数据", "无数据", dst);
|
||||
@@ -296,12 +299,13 @@ async function convert(src, dst, name, isClient) {
|
||||
function run() {
|
||||
var inputExcelPath = path_1.default.join(__dirname, main_1.config.PathExcel);
|
||||
var outJsonPath = path_1.default.join(__dirname, main_1.config.PathJson);
|
||||
var outLocalJsonPath = path_1.default.join(__dirname, "../json/");
|
||||
const files = fs.readdirSync(inputExcelPath);
|
||||
files.forEach((f) => {
|
||||
let name = f.substring(0, f.indexOf("."));
|
||||
let ext = f.toString().substring(f.lastIndexOf(".") + 1);
|
||||
if (ext == "xlsx") {
|
||||
convert(inputExcelPath + f, outJsonPath + name + ".json", name, true); // 客户端数据
|
||||
convert(inputExcelPath + f, outJsonPath + name + ".json", name, true, outLocalJsonPath + name + ".json"); // 客户端数据
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@@ -278,6 +278,7 @@ async function convert(src: string, dst: string, name: string, isClient: boolean
|
||||
});
|
||||
// 写入流
|
||||
if (r["undefined"] == null) {
|
||||
|
||||
await fs.writeFileSync(dst, JSON.stringify(r));
|
||||
|
||||
// 生成客户端脚本
|
||||
|
@@ -32,7 +32,7 @@ export async function createTs(name: string, fieldType: any, data: any, primary:
|
||||
}
|
||||
|
||||
var script =
|
||||
`import { JsonUtil } from "../../../ngame/util/JsonUtil";
|
||||
`import { JsonUtil } from "../../../../extensions/ngame/assets/ngame/util/JsonUtil";
|
||||
|
||||
export class Table${name} {
|
||||
static TableName: string = "${name}";
|
||||
|
@@ -2,5 +2,6 @@
|
||||
"__version__": "1.0.0",
|
||||
"PathExcel": "../../../config/",
|
||||
"PathJson": "../../../assets/resources/config/game/",
|
||||
"PathTs": "../../../assets/resources/config/ts/"
|
||||
"PathTs": "../../../assets/resources/config/ts/",
|
||||
"PathServerJson": "../../../../JisolGameServer/Main/src/main/resources/json"
|
||||
}
|
||||
|
@@ -10,6 +10,10 @@
|
||||
{
|
||||
"name": "World",
|
||||
"value": 1
|
||||
},
|
||||
{
|
||||
"name": "Loading",
|
||||
"value": 2
|
||||
}
|
||||
],
|
||||
"custom_joint_texture_layouts": [],
|
||||
|
Reference in New Issue
Block a user