英雄上阵选择 基本完成

This commit is contained in:
2024-12-10 16:44:54 +08:00
parent 9cd72c108e
commit 5fdd6486de
26 changed files with 16811 additions and 12790 deletions

View File

@@ -52,7 +52,7 @@
"__id__": 116 "__id__": 116
}, },
{ {
"__id__": 118 "__id__": 119
} }
], ],
"_prefab": { "_prefab": {
@@ -2700,7 +2700,7 @@
"fileId": "32bpMN2RNIXbFGf0XrTQcR" "fileId": "32bpMN2RNIXbFGf0XrTQcR"
}, },
{ {
"__type__": "51ecezMdSZLh4DDq/80AokX", "__type__": "cc.Button",
"_name": "", "_name": "",
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {}, "__editorExtras__": {},
@@ -2711,27 +2711,9 @@
"__prefab": { "__prefab": {
"__id__": 117 "__id__": 117
}, },
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "6bSZ2zJWFD1avkHKX88S6F"
},
{
"__type__": "cc.Button",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": {
"__id__": 119
},
"clickEvents": [ "clickEvents": [
{ {
"__id__": 120 "__id__": 118
} }
], ],
"_interactable": true, "_interactable": true,
@@ -2783,10 +2765,28 @@
"__id__": 1 "__id__": 1
}, },
"component": "", "component": "",
"_componentId": "51ecezMdSZLh4DDq/80AokX", "_componentId": "e5696NXnjxEoLkxESF1rUMV",
"handler": "select", "handler": "select",
"customEventData": "" "customEventData": ""
}, },
{
"__type__": "e5696NXnjxEoLkxESF1rUMV",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": {
"__id__": 120
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "b3T3dSL61JmpylrCsj3OgD"
},
{ {
"__type__": "cc.PrefabInfo", "__type__": "cc.PrefabInfo",
"root": { "root": {

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,13 @@
{
"ver": "1.1.50",
"importer": "prefab",
"imported": true,
"uuid": "b69eb41f-e4a8-4155-b45a-c44843f3f2b0",
"files": [
".json"
],
"subMetas": {},
"userData": {
"syncNodeName": "k2"
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,13 @@
{
"ver": "1.1.50",
"importer": "prefab",
"imported": true,
"uuid": "5bc8e101-184e-4bc3-bda8-05d6f02b2ae6",
"files": [
".json"
],
"subMetas": {},
"userData": {
"syncNodeName": "k3"
}
}

View File

@@ -0,0 +1,9 @@
{
"ver": "1.2.0",
"importer": "directory",
"imported": true,
"uuid": "423f61c3-c566-43bd-8c77-38f89b40752c",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@@ -0,0 +1,399 @@
[
{
"__type__": "cc.Prefab",
"_name": "k1",
"_objFlags": 0,
"__editorExtras__": {},
"_native": "",
"data": {
"__id__": 1
},
"optimizationPolicy": 0,
"persistent": false
},
{
"__type__": "cc.Node",
"_name": "k1",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": null,
"_children": [
{
"__id__": 2
},
{
"__id__": 8
}
],
"_active": true,
"_components": [
{
"__id__": 14
},
{
"__id__": 16
}
],
"_prefab": {
"__id__": 18
},
"_lpos": {
"__type__": "cc.Vec3",
"x": -0.041,
"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": 1,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": ""
},
{
"__type__": "cc.Node",
"_name": "shadow",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 3
},
{
"__id__": 5
}
],
"_prefab": {
"__id__": 7
},
"_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": 1,
"_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": 48,
"height": 10
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "a62pNH7WJL7Y2J76xlh6E5"
},
{
"__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": 190
},
"_spriteFrame": {
"__uuid__": "f87f53f9-2fba-4a5b-968a-79a593311ab2@34d88",
"__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": "c7Ljbr2uBPrIAr55WaWcYz"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "51ZjCtSAdKQ7Bnocj2kgu0",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
"__type__": "cc.Node",
"_name": "anm",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 9
},
{
"__id__": 11
}
],
"_prefab": {
"__id__": 13
},
"_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": 0.3,
"y": 0.3,
"z": 1
},
"_mobility": 0,
"_layer": 1,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": ""
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 8
},
"_enabled": true,
"__prefab": {
"__id__": 10
},
"_contentSize": {
"__type__": "cc.Size",
"width": 314.1499938964844,
"height": 336.3500061035156
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.483590644980259,
"y": 0.03225806506490894
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "9eaEPPEkdKYYfWIxgJ1KbU"
},
{
"__type__": "sp.Skeleton",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 8
},
"_enabled": true,
"__prefab": {
"__id__": 12
},
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_skeletonData": {
"__uuid__": "960e8420-772d-40c7-875e-71ef22a5a2c4",
"__expectedType__": "sp.SkeletonData"
},
"defaultSkin": "default",
"defaultAnimation": "Idle",
"_premultipliedAlpha": true,
"_timeScale": 0.9,
"_preCacheMode": 0,
"_cacheMode": 0,
"_sockets": [],
"_useTint": false,
"_debugMesh": false,
"_debugBones": false,
"_debugSlots": false,
"_enableBatch": false,
"loop": true,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "54k9q4iztE15bdAWnFOCpS"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "4aKyovCOhDJpr23Of35+5a",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": {
"__id__": 15
},
"_contentSize": {
"__type__": "cc.Size",
"width": 80,
"height": 80
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "14OhXRCixNOaApgow/hFbp"
},
{
"__type__": "44ef2gntuRF/bPCn4ViiEuB",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": {
"__id__": 17
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "37VPKEFLxPCbbMan7v7cCp"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "fdklpBwCBM/qJ4WFlQF3kT",
"instance": null,
"targetOverrides": null
}
]

View File

@@ -0,0 +1 @@
{"ver":"1.1.50","importer":"prefab","imported":true,"uuid":"43edbe26-97a6-4c3a-9626-df4f8a7addcd","files":[".json"],"subMetas":{},"userData":{"syncNodeName":"k1"}}

View File

@@ -0,0 +1,420 @@
[
{
"__type__": "cc.Prefab",
"_name": "k2",
"_objFlags": 0,
"__editorExtras__": {},
"_native": "",
"data": {
"__id__": 1
},
"optimizationPolicy": 0,
"persistent": false
},
{
"__type__": "cc.Node",
"_name": "k2",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": null,
"_children": [
{
"__id__": 2
},
{
"__id__": 8
}
],
"_active": true,
"_components": [
{
"__id__": 16
},
{
"__id__": 18
}
],
"_prefab": {
"__id__": 20
},
"_lpos": {
"__type__": "cc.Vec3",
"x": -0.041,
"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": 1,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": ""
},
{
"__type__": "cc.Node",
"_name": "shadow",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 3
},
{
"__id__": 5
}
],
"_prefab": {
"__id__": 7
},
"_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": 1,
"_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": 48,
"height": 10
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "a62pNH7WJL7Y2J76xlh6E5"
},
{
"__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": 190
},
"_spriteFrame": {
"__uuid__": "f87f53f9-2fba-4a5b-968a-79a593311ab2@34d88",
"__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": "c7Ljbr2uBPrIAr55WaWcYz"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "51ZjCtSAdKQ7Bnocj2kgu0",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
"__type__": "cc.Node",
"_name": "anm",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 9
},
{
"__id__": 11
},
{
"__id__": 13
}
],
"_prefab": {
"__id__": 15
},
"_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": 0.3,
"y": 0.3,
"z": 1
},
"_mobility": 0,
"_layer": 1,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": ""
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 8
},
"_enabled": true,
"__prefab": {
"__id__": 10
},
"_contentSize": {
"__type__": "cc.Size",
"width": 314.1499938964844,
"height": 336.3500061035156
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.483590644980259,
"y": 0.03225806506490894
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "9eaEPPEkdKYYfWIxgJ1KbU"
},
{
"__type__": "sp.Skeleton",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 8
},
"_enabled": true,
"__prefab": {
"__id__": 12
},
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_skeletonData": {
"__uuid__": "aff1f3dd-0cd5-4da5-8a47-7817fe67187b",
"__expectedType__": "sp.SkeletonData"
},
"defaultSkin": "default",
"defaultAnimation": "Idle",
"_premultipliedAlpha": true,
"_timeScale": 0.9,
"_preCacheMode": 0,
"_cacheMode": 0,
"_sockets": [],
"_useTint": false,
"_debugMesh": false,
"_debugBones": false,
"_debugSlots": false,
"_enableBatch": false,
"loop": true,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "54k9q4iztE15bdAWnFOCpS"
},
{
"__type__": "4ba4awuz8tF34rq4TkZ9W1S",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 8
},
"_enabled": true,
"__prefab": {
"__id__": 14
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "569pdLaDNB6qtHi4mnEa2p"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "4aKyovCOhDJpr23Of35+5a",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": {
"__id__": 17
},
"_contentSize": {
"__type__": "cc.Size",
"width": 80,
"height": 80
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "14OhXRCixNOaApgow/hFbp"
},
{
"__type__": "44ef2gntuRF/bPCn4ViiEuB",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": {
"__id__": 19
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "37VPKEFLxPCbbMan7v7cCp"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "fdklpBwCBM/qJ4WFlQF3kT",
"instance": null,
"targetOverrides": null
}
]

View File

@@ -0,0 +1,13 @@
{
"ver": "1.1.50",
"importer": "prefab",
"imported": true,
"uuid": "775e1a9d-95b2-436f-a2f4-14261fd4b555",
"files": [
".json"
],
"subMetas": {},
"userData": {
"syncNodeName": "k2"
}
}

View File

@@ -0,0 +1,420 @@
[
{
"__type__": "cc.Prefab",
"_name": "k3",
"_objFlags": 0,
"__editorExtras__": {},
"_native": "",
"data": {
"__id__": 1
},
"optimizationPolicy": 0,
"persistent": false
},
{
"__type__": "cc.Node",
"_name": "k3",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": null,
"_children": [
{
"__id__": 2
},
{
"__id__": 8
}
],
"_active": true,
"_components": [
{
"__id__": 16
},
{
"__id__": 18
}
],
"_prefab": {
"__id__": 20
},
"_lpos": {
"__type__": "cc.Vec3",
"x": -0.041,
"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": 1,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": ""
},
{
"__type__": "cc.Node",
"_name": "shadow",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 3
},
{
"__id__": 5
}
],
"_prefab": {
"__id__": 7
},
"_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": 1,
"_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": 48,
"height": 10
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "a62pNH7WJL7Y2J76xlh6E5"
},
{
"__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": 190
},
"_spriteFrame": {
"__uuid__": "f87f53f9-2fba-4a5b-968a-79a593311ab2@34d88",
"__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": "c7Ljbr2uBPrIAr55WaWcYz"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "51ZjCtSAdKQ7Bnocj2kgu0",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
"__type__": "cc.Node",
"_name": "anm",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 1
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 9
},
{
"__id__": 11
},
{
"__id__": 13
}
],
"_prefab": {
"__id__": 15
},
"_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": 0.3,
"y": 0.3,
"z": 1
},
"_mobility": 0,
"_layer": 1,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": ""
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 8
},
"_enabled": true,
"__prefab": {
"__id__": 10
},
"_contentSize": {
"__type__": "cc.Size",
"width": 314.1499938964844,
"height": 336.3500061035156
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.483590644980259,
"y": 0.03225806506490894
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "9eaEPPEkdKYYfWIxgJ1KbU"
},
{
"__type__": "sp.Skeleton",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 8
},
"_enabled": true,
"__prefab": {
"__id__": 12
},
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_skeletonData": {
"__uuid__": "af4a5925-6b13-46bc-ba05-2419fa3d5cb2",
"__expectedType__": "sp.SkeletonData"
},
"defaultSkin": "default",
"defaultAnimation": "Idle",
"_premultipliedAlpha": true,
"_timeScale": 0.9,
"_preCacheMode": 0,
"_cacheMode": 0,
"_sockets": [],
"_useTint": false,
"_debugMesh": false,
"_debugBones": false,
"_debugSlots": false,
"_enableBatch": false,
"loop": true,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "54k9q4iztE15bdAWnFOCpS"
},
{
"__type__": "4ba4awuz8tF34rq4TkZ9W1S",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 8
},
"_enabled": true,
"__prefab": {
"__id__": 14
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "569pdLaDNB6qtHi4mnEa2p"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "4aKyovCOhDJpr23Of35+5a",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": {
"__id__": 17
},
"_contentSize": {
"__type__": "cc.Size",
"width": 80,
"height": 80
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "14OhXRCixNOaApgow/hFbp"
},
{
"__type__": "44ef2gntuRF/bPCn4ViiEuB",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": {
"__id__": 19
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "37VPKEFLxPCbbMan7v7cCp"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "fdklpBwCBM/qJ4WFlQF3kT",
"instance": null,
"targetOverrides": null
}
]

View File

@@ -0,0 +1,13 @@
{
"ver": "1.1.50",
"importer": "prefab",
"imported": true,
"uuid": "2c9d8639-70e7-4794-a986-c41faf9607fa",
"files": [
".json"
],
"subMetas": {},
"userData": {
"syncNodeName": "k3"
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,13 +1,13 @@
import { instantiate, Label, Prefab, resources, Sprite, SpriteAtlas } from "cc"; import { instantiate, Label, Prefab, resources, Sprite, SpriteAtlas } from "cc";
import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS"; import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
import { oops } from "../../../../extensions/oops-plugin-framework/assets/core/Oops"; import { oops } from "../../../../extensions/oops-plugin-framework/assets/core/Oops";
import { HeroSetComp } from "./HeroSetComp"; import { HeroSelectComp } from "./HeroSelectComp";
import { smc } from "../common/SingletonModuleComp"; import { smc } from "../common/SingletonModuleComp";
import { HeroInfo } from "../common/config/heroSet"; import { HeroInfo } from "../common/config/heroSet";
/** HeroSet 模块 */ /** HeroSelect 模块 */
@ecs.register(`HeroSet`) @ecs.register(`HeroSelect`)
export class HeroSet extends ecs.Entity { export class HeroSelect extends ecs.Entity {
protected init() { protected init() {
// this.addComponents<ecs.Comp>(); // this.addComponents<ecs.Comp>();
@@ -31,7 +31,7 @@ export class HeroSet extends ecs.Entity {
if(smc.heros[uuid].slv>=3) {slv.getChildByName("s3").active=true} else {slv.getChildByName("s3").active=false}; if(smc.heros[uuid].slv>=3) {slv.getChildByName("s3").active=true} else {slv.getChildByName("s3").active=false};
if(smc.heros[uuid].slv>=4) {slv.getChildByName("s4").active=true} else {slv.getChildByName("s4").active=false}; if(smc.heros[uuid].slv>=4) {slv.getChildByName("s4").active=true} else {slv.getChildByName("s4").active=false};
if(smc.heros[uuid].slv>=5) {slv.getChildByName("s5").active=true} else {slv.getChildByName("s5").active=false}; if(smc.heros[uuid].slv>=5) {slv.getChildByName("s5").active=true} else {slv.getChildByName("s5").active=false};
let hcc = node.getComponent(HeroSetComp)!; let hcc = node.getComponent(HeroSelectComp)!;
console.log(hcc) console.log(hcc)
hcc.h_uuid = uuid; hcc.h_uuid = uuid;
this.add(hcc); this.add(hcc);

View File

@@ -0,0 +1,9 @@
{
"ver": "4.0.23",
"importer": "typescript",
"imported": true,
"uuid": "675a0ae2-9928-4084-80ac-1b35115e3959",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@@ -8,9 +8,9 @@ import { smc } from "../common/SingletonModuleComp";
const { ccclass, property } = _decorator; const { ccclass, property } = _decorator;
/** 视图层对象 */ /** 视图层对象 */
@ccclass('HeroSetComp') @ccclass('HeroSelectComp')
@ecs.register('HeroSetComp', false) @ecs.register('HeroSelectComp', false)
export class HeroSetComp extends CCComp { export class HeroSelectComp extends CCComp {
mhc_home: MissionHomeComp = null!; mhc_home: MissionHomeComp = null!;
h_uuid: number = 0; h_uuid: number = 0;
onLoad() { onLoad() {
@@ -28,10 +28,10 @@ export class HeroSetComp extends CCComp {
} }
} }
select(){ select(){
this.mhc_home.select_hero(this.h_uuid)
if(smc.vmdata.fight_heros.indexOf(this.h_uuid)>=0){ if(smc.vmdata.fight_heros.indexOf(this.h_uuid)>=0){
smc.vmdata.fight_heros.splice(smc.vmdata.fight_heros.indexOf(this.h_uuid),1) smc.vmdata.fight_heros.splice(smc.vmdata.fight_heros.indexOf(this.h_uuid),1)
this.show_bg(false) this.show_bg(false)
this.mhc_home.cancel_hero(this.h_uuid)
return return
} }
if(smc.vmdata.fight_heros.length>= 5){ if(smc.vmdata.fight_heros.length>= 5){
@@ -39,6 +39,7 @@ export class HeroSetComp extends CCComp {
return return
} }
smc.vmdata.fight_heros.push(this.h_uuid) smc.vmdata.fight_heros.push(this.h_uuid)
this.mhc_home.select_hero(this.h_uuid)
this.show_bg(true) this.show_bg(true)
} }
check_show(event: string, args: any){ check_show(event: string, args: any){

View File

@@ -0,0 +1,9 @@
{
"ver": "4.0.23",
"importer": "typescript",
"imported": true,
"uuid": "e5696357-9e3c-44a0-b931-112175ad4315",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@@ -1 +0,0 @@
{"ver":"4.0.23","importer":"typescript","imported":true,"uuid":"03dbdc6b-b8d2-44e9-9477-1ef40669367a","files":[],"subMetas":{},"userData":{}}

View File

@@ -1 +0,0 @@
{"ver":"4.0.23","importer":"typescript","imported":true,"uuid":"51ececcc-7526-4b87-80c3-abff34028917","files":[],"subMetas":{},"userData":{}}

View File

@@ -0,0 +1,20 @@
import { _decorator, Component, Node } from 'cc';
const { ccclass, property } = _decorator;
@ccclass('UiHeroComp')
export class UiHeroComp extends Component {
h_uuid:number=0
start() {
console.log("UiHeroComp start",this.h_uuid)
console.log(this)
}
to_destroy(){
console.log("UiHeroComp to_destroy",this.h_uuid)
this.node.destroy()
}
update(deltaTime: number) {
}
}

View File

@@ -0,0 +1,9 @@
{
"ver": "4.0.23",
"importer": "typescript",
"imported": true,
"uuid": "44ef2827-b6e4-45fd-b3c2-9f8562884b81",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@@ -1,8 +1,9 @@
import { instantiate, Prefab } from "cc"; import { instantiate, Prefab, resources, Sprite, SpriteAtlas } from "cc";
import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS"; import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
import { oops } from "../../../../extensions/oops-plugin-framework/assets/core/Oops"; import { oops } from "../../../../extensions/oops-plugin-framework/assets/core/Oops";
import { smc } from "../common/SingletonModuleComp"; import { smc } from "../common/SingletonModuleComp";
import { HCardComp } from "./HCardComp"; import { HCardComp } from "./HCardComp";
import { HeroInfo } from "../common/config/heroSet";
/** HCard 模块 */ /** HCard 模块 */
@ecs.register(`HCard`) @ecs.register(`HCard`)
@@ -13,8 +14,14 @@ export class HCard extends ecs.Entity {
// this.addComponents<ecs.Comp>(); // this.addComponents<ecs.Comp>();
} }
load(uuid:number=1001,index:number=-1,parent:any) { load(uuid:number=1001,index:number=-1,parent:any) {
var path = "gui/element/hcard"; var path = "game/gui/hcard";
var icon_path = "game/heros/herois"
resources.load(icon_path, SpriteAtlas, (err: any, atlas) => {
const sprite = node.getChildByName("Mask").getChildByName("icon").getComponent(Sprite);
sprite.spriteFrame = atlas.getSpriteFrame(HeroInfo[uuid].path);
});
var prefab: Prefab = oops.res.get(path, Prefab)!; var prefab: Prefab = oops.res.get(path, Prefab)!;
console.log("load_hcard",prefab)
var node = instantiate(prefab); var node = instantiate(prefab);
node.parent = parent node.parent = parent
var hcc = node.getComponent(HCardComp)!; var hcc = node.getComponent(HCardComp)!;

View File

@@ -211,6 +211,7 @@ export class MissionComp extends CCComp {
} }
heros_call(){ heros_call(){
let heros=smc.vmdata.fight_heros let heros=smc.vmdata.fight_heros
console.log("heros_call",heros)
for(let i=0;i<heros.length;i++){ for(let i=0;i<heros.length;i++){
this.addHero(heros[i],i) this.addHero(heros[i],i)
} }
@@ -223,7 +224,7 @@ export class MissionComp extends CCComp {
for(let i=0;i<heros.length;i++){ for(let i=0;i<heros.length;i++){
let hcard = ecs.getEntity<HCard>(HCard) let hcard = ecs.getEntity<HCard>(HCard)
// console.log("hcard:",hcard) // console.log("hcard:",hcard)
hcard.load(1001,i,node) hcard.load(heros[i].HeroView.hero_uuid,i,node)
} }
this.fight_start= true this.fight_start= true
} }

View File

@@ -1,8 +1,12 @@
import { _decorator, UITransform } from "cc"; import { _decorator, instantiate, Prefab, UITransform } from "cc";
import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS"; import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/module/common/CCComp"; import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/module/common/CCComp";
import { HeroList } from "../common/config/heroSet"; import { HeroInfo, HeroList } from "../common/config/heroSet";
import { HeroSet } from "../hero/HeroSet"; import { oops } from "../../../../extensions/oops-plugin-framework/assets/core/Oops";
import { UiHeroComp } from "../hero/UiHeroComp";
import { BoxSet } from "../common/config/BoxSet";
import { smc } from "../common/SingletonModuleComp";
import { HeroSelect } from "../hero/HeroSelect";
const { ccclass, property } = _decorator; const { ccclass, property } = _decorator;
@@ -10,13 +14,37 @@ const { ccclass, property } = _decorator;
@ccclass('MissionHomeComp') @ccclass('MissionHomeComp')
@ecs.register('MissionHome', false) @ecs.register('MissionHome', false)
export class MissionHomeComp extends CCComp { export class MissionHomeComp extends CCComp {
heros:any[]=[];
heros_pos:any=[
{uuid:0,px:-300},
{uuid:0,px:-200},
{uuid:0,px:-100},
{uuid:0,px:0},
{uuid:0,px:100},
]
/** 视图层逻辑代码分离演示 */ /** 视图层逻辑代码分离演示 */
start() { start() {
// var entity = this.ent as ecs.Entity; // ecs.Entity 可转为当前模块的具体实体对象 // var entity = this.ent as ecs.Entity; // ecs.Entity 可转为当前模块的具体实体对象
// this.on(ModuleEvent.Cmd, this.onHandler, this); // this.on(ModuleEvent.Cmd, this.onHandler, this);
this.loads() this.loads()
this.load_ui_heros()
}
start_mission() {
console.log("start_mission")
for(let i=0;i<this.heros.length;i++){
this.heros[i].to_destroy()
}
this.heros=[]
this.heros_pos=[
{uuid:0,px:-300},
{uuid:0,px:-200},
{uuid:0,px:-100},
{uuid:0,px:0},
{uuid:0,px:100},
]
} }
/** 全局消息逻辑处理 */ /** 全局消息逻辑处理 */
// private onHandler(event: string, args: any) { // private onHandler(event: string, args: any) {
// switch (event) { // switch (event) {
@@ -25,17 +53,70 @@ export class MissionHomeComp extends CCComp {
// } // }
// } // }
select_hero(h_uuid:number){ select_hero(h_uuid:number){
console.log("select_hero",h_uuid)
for(let i=0;i<4;i++){
if(this.heros_pos[i].uuid==0){
this.heros_pos[i].uuid=h_uuid
this.call_hero(h_uuid,i)
break
}
}
console.log("select_hero",this.heros_pos)
}
cancel_hero(h_uuid:number){
console.log("cancel_hero",h_uuid)
for(let i=0;i<4;i++){
if(this.heros_pos[i].uuid==h_uuid){
this.heros_pos[i].uuid=0
this.destory_hero(h_uuid)
}
}
console.log("cancel_hero",this.heros_pos)
}
call_hero(h_uuid:number,index:number){
var path = "game/heros/uiheros/"+HeroInfo[h_uuid].path;
var prefab: Prefab = oops.res.get(path, Prefab)!;
var node = instantiate(prefab);
var scene = smc.map.MapView.scene;
node.parent = scene.entityLayer!.node!
node.setPosition(this.heros_pos[index].px,BoxSet.GAME_LINE,0);
let comp = node.getComponent(UiHeroComp)
console.log("call_hero",node)
comp.h_uuid = h_uuid
this.heros.push(comp)
console.log("call heros",this.heros)
}
destory_hero(h_uuid:number){
console.log("destory hero",this.heros)
for(let i=0;i<this.heros.length;i++){
if(this.heros[i].h_uuid==h_uuid){
this.heros[i].to_destroy()
this.heros.splice(i,1)
return
}
}
}
load_ui_heros(){
for(let i=0;i<smc.vmdata.fight_heros.length;i++){
this.select_hero(smc.vmdata.fight_heros[i])
}
} }
loads(){ loads(){
let hc:number =HeroList.length let hc:number =HeroList.length
let parent= this.node.getChildByName("heros").getChildByName("view").getChildByName("content") let parent= this.node.getChildByName("heros").getChildByName("view").getChildByName("content")
parent.getComponent(UITransform).width=hc*150 parent.getComponent(UITransform).width=hc*150
for (let i = 0; i < hc; i++) { for (let i = 0; i < hc; i++) {
let hcc =ecs.getEntity<HeroSet>(HeroSet) let hcc =ecs.getEntity<HeroSelect>(HeroSelect)
hcc.load(HeroList[i],parent) hcc.load(HeroList[i],parent)
} }
} }
show_heros(){
this.node.getChildByName("heros").setPosition(0,290)
}
hide_heros(){
this.node.getChildByName("heros").setPosition(0,-400)
}
/** 视图对象通过 ecs.Entity.remove(ModuleViewComp) 删除组件是触发组件处理自定义释放逻辑 */ /** 视图对象通过 ecs.Entity.remove(ModuleViewComp) 删除组件是触发组件处理自定义释放逻辑 */
reset() { reset() {
this.node.destroy(); this.node.destroy();