装备添加
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -1,13 +0,0 @@
|
||||
{
|
||||
"ver": "1.1.50",
|
||||
"importer": "prefab",
|
||||
"imported": true,
|
||||
"uuid": "407f71e4-91fa-4800-be94-bcb155cde502",
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {},
|
||||
"userData": {
|
||||
"syncNodeName": "MSCard"
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,13 +0,0 @@
|
||||
{
|
||||
"ver": "1.1.50",
|
||||
"importer": "prefab",
|
||||
"imported": true,
|
||||
"uuid": "40d09ceb-c810-48fc-9264-1398cbfd5e8a",
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {},
|
||||
"userData": {
|
||||
"syncNodeName": "goods"
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,13 +0,0 @@
|
||||
{
|
||||
"ver": "1.1.50",
|
||||
"importer": "prefab",
|
||||
"imported": true,
|
||||
"uuid": "316eaee3-6339-4f61-a104-b3484b3e7c84",
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {},
|
||||
"userData": {
|
||||
"syncNodeName": "hcard"
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,13 +0,0 @@
|
||||
{
|
||||
"ver": "1.1.50",
|
||||
"importer": "prefab",
|
||||
"imported": true,
|
||||
"uuid": "1331ab21-9111-4f46-b039-db7ab85aef63",
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {},
|
||||
"userData": {
|
||||
"syncNodeName": "hchip"
|
||||
}
|
||||
}
|
||||
@@ -1,945 +0,0 @@
|
||||
[
|
||||
{
|
||||
"__type__": "cc.Prefab",
|
||||
"_name": "hero_card",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_native": "",
|
||||
"data": {
|
||||
"__id__": 1
|
||||
},
|
||||
"optimizationPolicy": 0,
|
||||
"persistent": false
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "hero_card",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_parent": null,
|
||||
"_children": [
|
||||
{
|
||||
"__id__": 2
|
||||
},
|
||||
{
|
||||
"__id__": 24
|
||||
}
|
||||
],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 38
|
||||
},
|
||||
{
|
||||
"__id__": 40
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 42
|
||||
},
|
||||
"_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": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "g1",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_parent": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_children": [
|
||||
{
|
||||
"__id__": 3
|
||||
},
|
||||
{
|
||||
"__id__": 11
|
||||
}
|
||||
],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 19
|
||||
},
|
||||
{
|
||||
"__id__": 21
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 23
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": -81.42,
|
||||
"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": "CardFrame03_n_Bg",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_parent": {
|
||||
"__id__": 2
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 4
|
||||
},
|
||||
{
|
||||
"__id__": 6
|
||||
},
|
||||
{
|
||||
"__id__": 8
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 10
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 95,
|
||||
"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__": 3
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 5
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 160,
|
||||
"height": 190
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5,
|
||||
"y": 0.5
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "23b3R5XcpIf6TCaHwMFZeY"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Sprite",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 3
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 7
|
||||
},
|
||||
"_customMaterial": null,
|
||||
"_srcBlendFactor": 2,
|
||||
"_dstBlendFactor": 4,
|
||||
"_color": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 131,
|
||||
"g": 206,
|
||||
"b": 0,
|
||||
"a": 255
|
||||
},
|
||||
"_spriteFrame": {
|
||||
"__uuid__": "260d01c4-5936-4c90-8ff9-b892c60b2e48@8ed5b",
|
||||
"__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": "447ZF13B9I0K3VErEt0VZJ"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Widget",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 3
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 9
|
||||
},
|
||||
"_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": 140,
|
||||
"_originalHeight": 190,
|
||||
"_alignMode": 2,
|
||||
"_lockFlags": 0,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "8e/l3/345BtaHuqgPTKvkl"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 1
|
||||
},
|
||||
"asset": {
|
||||
"__id__": 0
|
||||
},
|
||||
"fileId": "d7ADKerkFGgbcszyQFxJBc",
|
||||
"instance": null,
|
||||
"targetOverrides": null,
|
||||
"nestedPrefabInstanceRoots": null
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "CardFrame03_n_InnerBg",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_parent": {
|
||||
"__id__": 2
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 12
|
||||
},
|
||||
{
|
||||
"__id__": 14
|
||||
},
|
||||
{
|
||||
"__id__": 16
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 18
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 118,
|
||||
"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__": 11
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 13
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 136,
|
||||
"height": 120
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5,
|
||||
"y": 0.5
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "b3Wc8YkYRPZYQYy4uNvp/L"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Sprite",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 11
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 15
|
||||
},
|
||||
"_customMaterial": null,
|
||||
"_srcBlendFactor": 2,
|
||||
"_dstBlendFactor": 4,
|
||||
"_color": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 23,
|
||||
"g": 160,
|
||||
"b": 71,
|
||||
"a": 255
|
||||
},
|
||||
"_spriteFrame": {
|
||||
"__uuid__": "260d01c4-5936-4c90-8ff9-b892c60b2e48@e230b",
|
||||
"__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": "55HxuHUmhHc6Gm8BCzTMdC"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Widget",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 11
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 17
|
||||
},
|
||||
"_alignFlags": 41,
|
||||
"_target": null,
|
||||
"_left": 12,
|
||||
"_right": 12,
|
||||
"_top": 12,
|
||||
"_bottom": 0,
|
||||
"_horizontalCenter": 0,
|
||||
"_verticalCenter": 0,
|
||||
"_isAbsLeft": true,
|
||||
"_isAbsRight": true,
|
||||
"_isAbsTop": true,
|
||||
"_isAbsBottom": true,
|
||||
"_isAbsHorizontalCenter": true,
|
||||
"_isAbsVerticalCenter": true,
|
||||
"_originalWidth": 130,
|
||||
"_originalHeight": 0,
|
||||
"_alignMode": 2,
|
||||
"_lockFlags": 0,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "bbe6WvQMBH/b302ogpOB/7"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 1
|
||||
},
|
||||
"asset": {
|
||||
"__id__": 0
|
||||
},
|
||||
"fileId": "feZ3tMV8JJiIAoYkJUavvC",
|
||||
"instance": null,
|
||||
"targetOverrides": null,
|
||||
"nestedPrefabInstanceRoots": null
|
||||
},
|
||||
{
|
||||
"__type__": "cc.UITransform",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 2
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 20
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 160,
|
||||
"height": 190
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5,
|
||||
"y": 0
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "d73m+6mWxHMbW5QE1RcNPo"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Sprite",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 2
|
||||
},
|
||||
"_enabled": false,
|
||||
"__prefab": {
|
||||
"__id__": 22
|
||||
},
|
||||
"_customMaterial": null,
|
||||
"_srcBlendFactor": 2,
|
||||
"_dstBlendFactor": 4,
|
||||
"_color": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 255,
|
||||
"g": 255,
|
||||
"b": 255,
|
||||
"a": 255
|
||||
},
|
||||
"_spriteFrame": {
|
||||
"__uuid__": "f87f53f9-2fba-4a5b-968a-79a593311ab2@cf2fa",
|
||||
"__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": "69UiHzAq9JL6rcoi5Q1nzE"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 1
|
||||
},
|
||||
"asset": {
|
||||
"__id__": 0
|
||||
},
|
||||
"fileId": "c0milzaOFAeajzeOztocv4",
|
||||
"instance": null,
|
||||
"targetOverrides": null,
|
||||
"nestedPrefabInstanceRoots": null
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "Mask",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_parent": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_children": [
|
||||
{
|
||||
"__id__": 25
|
||||
}
|
||||
],
|
||||
"_active": false,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 31
|
||||
},
|
||||
{
|
||||
"__id__": 33
|
||||
},
|
||||
{
|
||||
"__id__": 35
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 37
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 14.991,
|
||||
"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": "show",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_parent": {
|
||||
"__id__": 24
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 26
|
||||
},
|
||||
{
|
||||
"__id__": 28
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 30
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": -72.459,
|
||||
"z": 0
|
||||
},
|
||||
"_lrot": {
|
||||
"__type__": "cc.Quat",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0,
|
||||
"w": 1
|
||||
},
|
||||
"_lscale": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 2,
|
||||
"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__": 25
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 27
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 200,
|
||||
"height": 200
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5,
|
||||
"y": 0.5
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "8cZcfzq5BDn7paNVrhB9Cx"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Sprite",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 25
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 29
|
||||
},
|
||||
"_customMaterial": null,
|
||||
"_srcBlendFactor": 2,
|
||||
"_dstBlendFactor": 4,
|
||||
"_color": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 255,
|
||||
"g": 255,
|
||||
"b": 0,
|
||||
"a": 255
|
||||
},
|
||||
"_spriteFrame": {
|
||||
"__uuid__": "f87f53f9-2fba-4a5b-968a-79a593311ab2@a4212",
|
||||
"__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": "154cZlN8BOiJSGNTBkNyXP"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 1
|
||||
},
|
||||
"asset": {
|
||||
"__id__": 0
|
||||
},
|
||||
"fileId": "28O6nHVn9MQKajOUpqOv7z",
|
||||
"instance": null,
|
||||
"targetOverrides": null,
|
||||
"nestedPrefabInstanceRoots": null
|
||||
},
|
||||
{
|
||||
"__type__": "cc.UITransform",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 24
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 32
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 160,
|
||||
"height": 190
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5,
|
||||
"y": 0.5
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "03nFacWDxKUqOKoEeKhIcQ"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Mask",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 24
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 34
|
||||
},
|
||||
"_type": 3,
|
||||
"_inverted": false,
|
||||
"_segments": 64,
|
||||
"_alphaThreshold": 0.1,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "85fZwmWNJIObQuHGJT6pzn"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Sprite",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 24
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 36
|
||||
},
|
||||
"_customMaterial": null,
|
||||
"_srcBlendFactor": 2,
|
||||
"_dstBlendFactor": 4,
|
||||
"_color": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 255,
|
||||
"g": 255,
|
||||
"b": 255,
|
||||
"a": 255
|
||||
},
|
||||
"_spriteFrame": {
|
||||
"__uuid__": "260d01c4-5936-4c90-8ff9-b892c60b2e48@8ed5b",
|
||||
"__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": "7fmI0/mcBOEINzbALdkke9"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 1
|
||||
},
|
||||
"asset": {
|
||||
"__id__": 0
|
||||
},
|
||||
"fileId": "80mCFZmlRMdoraPwBYmdb5",
|
||||
"instance": null,
|
||||
"targetOverrides": null,
|
||||
"nestedPrefabInstanceRoots": null
|
||||
},
|
||||
{
|
||||
"__type__": "cc.UITransform",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 39
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 160,
|
||||
"height": 200
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5,
|
||||
"y": 0.5
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "ffq0KoarVDR6W0xHCmtCV+"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Sprite",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 41
|
||||
},
|
||||
"_customMaterial": null,
|
||||
"_srcBlendFactor": 2,
|
||||
"_dstBlendFactor": 4,
|
||||
"_color": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 255,
|
||||
"g": 255,
|
||||
"b": 255,
|
||||
"a": 255
|
||||
},
|
||||
"_spriteFrame": null,
|
||||
"_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": "32bpMN2RNIXbFGf0XrTQcR"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 1
|
||||
},
|
||||
"asset": {
|
||||
"__id__": 0
|
||||
},
|
||||
"fileId": "9eIoeBQ/FAuKISfw/S9q2E",
|
||||
"instance": null,
|
||||
"targetOverrides": null
|
||||
}
|
||||
]
|
||||
@@ -1,13 +0,0 @@
|
||||
{
|
||||
"ver": "1.1.50",
|
||||
"importer": "prefab",
|
||||
"imported": true,
|
||||
"uuid": "79e41d70-e29c-4986-98a4-349aa253f58e",
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {},
|
||||
"userData": {
|
||||
"syncNodeName": "hero_card"
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,13 +0,0 @@
|
||||
{
|
||||
"ver": "1.1.50",
|
||||
"importer": "prefab",
|
||||
"imported": true,
|
||||
"uuid": "a200fc7f-7296-4e79-95c2-84f0f01485d7",
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {},
|
||||
"userData": {
|
||||
"syncNodeName": "hero_set"
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,13 +0,0 @@
|
||||
{
|
||||
"ver": "1.1.50",
|
||||
"importer": "prefab",
|
||||
"imported": true,
|
||||
"uuid": "a8eef812-551a-46fc-9dc2-b5b544e00d36",
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {},
|
||||
"userData": {
|
||||
"syncNodeName": "item"
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,13 +0,0 @@
|
||||
{
|
||||
"ver": "1.1.50",
|
||||
"importer": "prefab",
|
||||
"imported": true,
|
||||
"uuid": "40f0eb45-ca9b-486a-aa48-936a2ec8d05d",
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {},
|
||||
"userData": {
|
||||
"syncNodeName": "reward"
|
||||
}
|
||||
}
|
||||
@@ -1,564 +0,0 @@
|
||||
[
|
||||
{
|
||||
"__type__": "cc.Prefab",
|
||||
"_name": "schip",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_native": "",
|
||||
"data": {
|
||||
"__id__": 1
|
||||
},
|
||||
"optimizationPolicy": 0,
|
||||
"persistent": false
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "schip",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_parent": null,
|
||||
"_children": [
|
||||
{
|
||||
"__id__": 2
|
||||
},
|
||||
{
|
||||
"__id__": 8
|
||||
}
|
||||
],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 22
|
||||
},
|
||||
{
|
||||
"__id__": 24
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 26
|
||||
},
|
||||
"_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": 1073741824,
|
||||
"_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
|
||||
}
|
||||
],
|
||||
"_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": 1073741824,
|
||||
"_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": 100,
|
||||
"height": 100
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5,
|
||||
"y": 0.5
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "8aMDFOPjdOD50hx4wXeoYh"
|
||||
},
|
||||
{
|
||||
"__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": 225,
|
||||
"g": 247,
|
||||
"b": 252,
|
||||
"a": 255
|
||||
},
|
||||
"_spriteFrame": {
|
||||
"__uuid__": "f87f53f9-2fba-4a5b-968a-79a593311ab2@f0800",
|
||||
"__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": "96DghIs15DipRklEp/GK7P"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 1
|
||||
},
|
||||
"asset": {
|
||||
"__id__": 0
|
||||
},
|
||||
"fileId": "a3aPVEqO5En4T5ia2oYpXQ",
|
||||
"instance": null,
|
||||
"targetOverrides": null,
|
||||
"nestedPrefabInstanceRoots": null
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "skill",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_parent": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_children": [
|
||||
{
|
||||
"__id__": 9
|
||||
}
|
||||
],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 15
|
||||
},
|
||||
{
|
||||
"__id__": 17
|
||||
},
|
||||
{
|
||||
"__id__": 19
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 21
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 2.228,
|
||||
"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": 1073741824,
|
||||
"_euler": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "icon",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_parent": {
|
||||
"__id__": 8
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 10
|
||||
},
|
||||
{
|
||||
"__id__": 12
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 14
|
||||
},
|
||||
"_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": 1073741824,
|
||||
"_euler": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.UITransform",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 9
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 11
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 100,
|
||||
"height": 100
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5,
|
||||
"y": 0.5
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "35djko+rVPxo0Cgovwnr9w"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Sprite",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 9
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 13
|
||||
},
|
||||
"_customMaterial": null,
|
||||
"_srcBlendFactor": 2,
|
||||
"_dstBlendFactor": 4,
|
||||
"_color": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 255,
|
||||
"g": 255,
|
||||
"b": 255,
|
||||
"a": 255
|
||||
},
|
||||
"_spriteFrame": {
|
||||
"__uuid__": "767c21dd-b2a2-4118-a12d-f67a8039abd4@ec0a2",
|
||||
"__expectedType__": "cc.SpriteFrame"
|
||||
},
|
||||
"_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": "85FjuP7AFBvr2ZutPHmCqx"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 1
|
||||
},
|
||||
"asset": {
|
||||
"__id__": 0
|
||||
},
|
||||
"fileId": "3c0GGaCYhH9ZM7ftnUr23N",
|
||||
"instance": null,
|
||||
"targetOverrides": null,
|
||||
"nestedPrefabInstanceRoots": null
|
||||
},
|
||||
{
|
||||
"__type__": "cc.UITransform",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 8
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 16
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 82,
|
||||
"height": 80
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5,
|
||||
"y": 0.5
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "6boO4cWO1OeqBw5pnxsiMt"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Mask",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 8
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 18
|
||||
},
|
||||
"_type": 3,
|
||||
"_inverted": false,
|
||||
"_segments": 64,
|
||||
"_alphaThreshold": 0.1,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "96GX6HYqRLFbjMFRXWcmhy"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Sprite",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 8
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 20
|
||||
},
|
||||
"_customMaterial": null,
|
||||
"_srcBlendFactor": 2,
|
||||
"_dstBlendFactor": 4,
|
||||
"_color": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 255,
|
||||
"g": 255,
|
||||
"b": 255,
|
||||
"a": 255
|
||||
},
|
||||
"_spriteFrame": {
|
||||
"__uuid__": "f87f53f9-2fba-4a5b-968a-79a593311ab2@4f4b0",
|
||||
"__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": "4bov6Lz15FfbBnjGakiHLR"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 1
|
||||
},
|
||||
"asset": {
|
||||
"__id__": 0
|
||||
},
|
||||
"fileId": "05rYYTDXFNEYno0sy1pY9O",
|
||||
"instance": null,
|
||||
"targetOverrides": null,
|
||||
"nestedPrefabInstanceRoots": null
|
||||
},
|
||||
{
|
||||
"__type__": "cc.UITransform",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 23
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 100,
|
||||
"height": 100
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5,
|
||||
"y": 0.5
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "bafb2QLFdOPYA6doPdH0gj"
|
||||
},
|
||||
{
|
||||
"__type__": "f653eE60XxPYoCKHpWk31Mn",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 25
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "2aKWSWqChGQ4cms2EXhenV"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 1
|
||||
},
|
||||
"asset": {
|
||||
"__id__": 0
|
||||
},
|
||||
"fileId": "c46/YsCPVOJYA4mWEpNYRx",
|
||||
"instance": null,
|
||||
"targetOverrides": null
|
||||
}
|
||||
]
|
||||
@@ -1,13 +0,0 @@
|
||||
{
|
||||
"ver": "1.1.50",
|
||||
"importer": "prefab",
|
||||
"imported": true,
|
||||
"uuid": "7c02fdcf-20fe-40f6-a8a5-f5a8c1460861",
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {},
|
||||
"userData": {
|
||||
"syncNodeName": "schip"
|
||||
}
|
||||
}
|
||||
2051
assets/resources/game/heros/equips.plist
Normal file
2051
assets/resources/game/heros/equips.plist
Normal file
File diff suppressed because it is too large
Load Diff
6227
assets/resources/game/heros/equips.plist.meta
Normal file
6227
assets/resources/game/heros/equips.plist.meta
Normal file
File diff suppressed because it is too large
Load Diff
BIN
assets/resources/game/heros/equips.png
Normal file
BIN
assets/resources/game/heros/equips.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 570 KiB |
42
assets/resources/game/heros/equips.png.meta
Normal file
42
assets/resources/game/heros/equips.png.meta
Normal file
@@ -0,0 +1,42 @@
|
||||
{
|
||||
"ver": "1.0.26",
|
||||
"importer": "image",
|
||||
"imported": true,
|
||||
"uuid": "305dbfcf-d487-417a-8480-ed952dd8f353",
|
||||
"files": [
|
||||
".json",
|
||||
".png"
|
||||
],
|
||||
"subMetas": {
|
||||
"6c48a": {
|
||||
"importer": "texture",
|
||||
"uuid": "305dbfcf-d487-417a-8480-ed952dd8f353@6c48a",
|
||||
"displayName": "equips",
|
||||
"id": "6c48a",
|
||||
"name": "texture",
|
||||
"userData": {
|
||||
"wrapModeS": "repeat",
|
||||
"wrapModeT": "repeat",
|
||||
"minfilter": "linear",
|
||||
"magfilter": "linear",
|
||||
"mipfilter": "none",
|
||||
"anisotropy": 0,
|
||||
"isUuid": true,
|
||||
"imageUuidOrDatabaseUri": "305dbfcf-d487-417a-8480-ed952dd8f353",
|
||||
"visible": false
|
||||
},
|
||||
"ver": "1.0.22",
|
||||
"imported": true,
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {}
|
||||
}
|
||||
},
|
||||
"userData": {
|
||||
"hasAlpha": true,
|
||||
"type": "texture",
|
||||
"fixAlphaTransparencyArtifacts": false,
|
||||
"redirect": "305dbfcf-d487-417a-8480-ed952dd8f353@6c48a"
|
||||
}
|
||||
}
|
||||
@@ -27,18 +27,18 @@
|
||||
],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 70
|
||||
},
|
||||
{
|
||||
"__id__": 72
|
||||
},
|
||||
{
|
||||
"__id__": 74
|
||||
},
|
||||
{
|
||||
"__id__": 76
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 76
|
||||
"__id__": 78
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
@@ -196,18 +196,18 @@
|
||||
],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 63
|
||||
},
|
||||
{
|
||||
"__id__": 65
|
||||
},
|
||||
{
|
||||
"__id__": 67
|
||||
},
|
||||
{
|
||||
"__id__": 69
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 69
|
||||
"__id__": 71
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
@@ -257,17 +257,17 @@
|
||||
"__id__": 48
|
||||
},
|
||||
{
|
||||
"__id__": 54
|
||||
"__id__": 56
|
||||
}
|
||||
],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 60
|
||||
"__id__": 62
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 62
|
||||
"__id__": 64
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
@@ -1211,10 +1211,13 @@
|
||||
},
|
||||
{
|
||||
"__id__": 51
|
||||
},
|
||||
{
|
||||
"__id__": 53
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 53
|
||||
"__id__": 55
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
@@ -1291,6 +1294,24 @@
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "6fzmfjcbNPK6tOzQOKJfRV"
|
||||
},
|
||||
{
|
||||
"__type__": "7aec99sUJ9LXZmTdrpztb3I",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 48
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 54
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "9fb2XegmFAXrZyU6RtI5m1"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
@@ -1316,14 +1337,14 @@
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 55
|
||||
"__id__": 57
|
||||
},
|
||||
{
|
||||
"__id__": 57
|
||||
"__id__": 59
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 59
|
||||
"__id__": 61
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
@@ -1360,11 +1381,11 @@
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 54
|
||||
"__id__": 56
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 56
|
||||
"__id__": 58
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
@@ -1388,11 +1409,11 @@
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 54
|
||||
"__id__": 56
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 58
|
||||
"__id__": 60
|
||||
},
|
||||
"light": {
|
||||
"__uuid__": "319c7eb8-9826-48b6-81e4-82559dbf82a8",
|
||||
@@ -1427,7 +1448,7 @@
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 61
|
||||
"__id__": 63
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
@@ -1468,7 +1489,7 @@
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 64
|
||||
"__id__": 66
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
@@ -1496,7 +1517,7 @@
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 66
|
||||
"__id__": 68
|
||||
},
|
||||
"camera": {
|
||||
"__id__": 3
|
||||
@@ -1514,7 +1535,7 @@
|
||||
"__id__": 51
|
||||
},
|
||||
"SkillLayer": {
|
||||
"__id__": 57
|
||||
"__id__": 59
|
||||
},
|
||||
"isFollowPlayer": true,
|
||||
"_id": ""
|
||||
@@ -1533,7 +1554,7 @@
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 68
|
||||
"__id__": 70
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
@@ -1564,7 +1585,7 @@
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 71
|
||||
"__id__": 73
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
@@ -1592,7 +1613,7 @@
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 73
|
||||
"__id__": 75
|
||||
},
|
||||
"_cameraComponent": {
|
||||
"__id__": 3
|
||||
@@ -1614,7 +1635,7 @@
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 75
|
||||
"__id__": 77
|
||||
},
|
||||
"_alignFlags": 45,
|
||||
"_target": null,
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,13 +0,0 @@
|
||||
{
|
||||
"ver": "1.1.50",
|
||||
"importer": "prefab",
|
||||
"imported": true,
|
||||
"uuid": "ad43a39d-f48c-4618-966f-0a575b82cd30",
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {},
|
||||
"userData": {
|
||||
"syncNodeName": "hero_home"
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -7615,10 +7615,10 @@
|
||||
"height": 62,
|
||||
"rawWidth": 60,
|
||||
"rawHeight": 62,
|
||||
"borderTop": 22,
|
||||
"borderBottom": 23,
|
||||
"borderLeft": 19,
|
||||
"borderRight": 19,
|
||||
"borderTop": 30,
|
||||
"borderBottom": 26,
|
||||
"borderLeft": 25,
|
||||
"borderRight": 23,
|
||||
"packable": true,
|
||||
"pixelsToUnit": 100,
|
||||
"pivotX": 0.5,
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,32 +1,122 @@
|
||||
/*
|
||||
CardList type: 1:精灵 2:技能 3:装备
|
||||
CardList type: 1:伙伴 2:技能 3:装备
|
||||
*/
|
||||
|
||||
export const CardList={
|
||||
1:[
|
||||
{uuid:9001,type:1},{uuid:9002,type:1},{uuid:9011,type:1},{uuid:9021,type:1},{uuid:9031,type:1},{uuid:9041,type:1}
|
||||
// {uuid:9007,type:1},{uuid:9008,type:1},{uuid:9009,type:1},{uuid:9010,type:1},{uuid:9011,type:1},{uuid:9012,type:1},
|
||||
],
|
||||
2:[
|
||||
{uuid:9001,type:1},{uuid:9002,type:1},{uuid:9011,type:1},{uuid:9021,type:1},{uuid:9031,type:1},{uuid:9041,type:1}
|
||||
],
|
||||
3:[
|
||||
{uuid:9001,type:1},{uuid:9002,type:1},{uuid:9011,type:1},{uuid:9021,type:1},{uuid:9031,type:1},{uuid:9041,type:1}
|
||||
],
|
||||
4:[
|
||||
{uuid:9001,type:1},{uuid:9002,type:1},{uuid:9011,type:1},{uuid:9021,type:1},{uuid:9031,type:1},{uuid:9041,type:1}
|
||||
],
|
||||
5:[
|
||||
{uuid:1001,type:2},{uuid:1002,type:2},{uuid:4011,type:2},{uuid:4012,type:2},
|
||||
{uuid:6001,type:3},{uuid:6004,type:3},{uuid:6101,type:3},{uuid:6002,type:3},{uuid:6003,type:3},{uuid:6005,type:3},{uuid:6006,type:3},
|
||||
{uuid:6102,type:3},{uuid:6103,type:3}, {uuid:6210,type:3},{uuid:6213,type:3},{uuid:6216,type:3},{uuid:6211,type:3},{uuid:6212,type:3},
|
||||
{uuid:6214,type:3},{uuid:6215,type:3},{uuid:6217,type:3},{uuid:6218,type:3},
|
||||
// {uuid:9007,type:1},{uuid:9008,type:1},{uuid:9009,type:1},{uuid:9010,type:1},{uuid:9011,type:1},{uuid:9012,type:1},
|
||||
],
|
||||
6:[
|
||||
{uuid:1001,type:2},{uuid:1002,type:2},{uuid:4011,type:2},{uuid:4012,type:2},
|
||||
{uuid:6001,type:3},{uuid:6004,type:3},{uuid:6101,type:3},{uuid:6002,type:3},{uuid:6003,type:3},{uuid:6005,type:3},{uuid:6006,type:3},
|
||||
{uuid:6102,type:3},{uuid:6103,type:3}, {uuid:6210,type:3},{uuid:6213,type:3},{uuid:6216,type:3},{uuid:6211,type:3},{uuid:6212,type:3},
|
||||
{uuid:6214,type:3},{uuid:6215,type:3},{uuid:6217,type:3},{uuid:6218,type:3},
|
||||
],
|
||||
import { HeroList } from "./heroSet"
|
||||
import { HeroSkillList } from "./SkillSet"
|
||||
import { equip_list } from "./Equips"
|
||||
|
||||
//1:伙伴 2:技能 3:装备的出现概率配置
|
||||
export const CardProbability={
|
||||
1:0.5,
|
||||
2:0.3,
|
||||
3:0.2,
|
||||
}
|
||||
export const cardType={
|
||||
HERO:1,
|
||||
SKILL:2,
|
||||
EQUIP:3,
|
||||
}
|
||||
// 获取随机卡牌UUID
|
||||
export function getRandomCardUUID(
|
||||
heroRate: number = 1, // 伙伴出现概率修正系数
|
||||
skillRate: number = 1, // 技能出现概率修正系数
|
||||
equipRate: number = 1 // 装备出现概率修正系数
|
||||
): { type: number; uuid: number } {
|
||||
// 计算修正后的概率
|
||||
const adjustedProbability = {
|
||||
1: CardProbability[1] * heroRate,
|
||||
2: CardProbability[2] * skillRate,
|
||||
3: CardProbability[3] * equipRate
|
||||
};
|
||||
|
||||
// 计算总概率
|
||||
const totalProbability = Object.values(adjustedProbability).reduce((sum, prob) => sum + prob, 0);
|
||||
|
||||
// 生成0-1之间的随机数
|
||||
const random = Math.random() * totalProbability;
|
||||
let cumulativeProbability = 0;
|
||||
|
||||
// 根据修正后的概率确定卡牌类型
|
||||
let cardType = 1; // 默认类型为伙伴
|
||||
for (const [type, probability] of Object.entries(adjustedProbability)) {
|
||||
cumulativeProbability += probability;
|
||||
if (random <= cumulativeProbability) {
|
||||
cardType = parseInt(type);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// 根据类型获取对应的卡牌列表
|
||||
let cardList: number[] = [];
|
||||
switch (cardType) {
|
||||
case 1: // 伙伴
|
||||
cardList = HeroList;
|
||||
break;
|
||||
case 2: // 技能
|
||||
cardList = HeroSkillList;
|
||||
break;
|
||||
case 3: // 装备
|
||||
cardList = equip_list;
|
||||
break;
|
||||
}
|
||||
|
||||
// 从对应类型的卡牌列表中随机选择一个
|
||||
const randomIndex = Math.floor(Math.random() * cardList.length);
|
||||
return {type:cardType,uuid:cardList[randomIndex]};
|
||||
}
|
||||
|
||||
// 获取指定类型的随机卡牌UUID
|
||||
export function getRandomCardUUIDByType(type: number): number {
|
||||
let cardList: number[] = [];
|
||||
switch (type) {
|
||||
case 1: // 伙伴
|
||||
cardList = HeroList;
|
||||
break;
|
||||
case 2: // 技能
|
||||
cardList = HeroSkillList;
|
||||
break;
|
||||
case 3: // 装备
|
||||
cardList = equip_list;
|
||||
break;
|
||||
default:
|
||||
throw new Error(`Invalid card type: ${type}`);
|
||||
}
|
||||
|
||||
const randomIndex = Math.floor(Math.random() * cardList.length);
|
||||
return cardList[randomIndex];
|
||||
}
|
||||
|
||||
// 获取多个不重复的指定类型卡牌
|
||||
export function getRandomCardsByType(
|
||||
type: number,
|
||||
count: number
|
||||
): { type: number; uuid: number }[] {
|
||||
let cardList: number[] = [];
|
||||
switch (type) {
|
||||
case cardType.HERO:
|
||||
cardList = HeroList;
|
||||
break;
|
||||
case cardType.SKILL:
|
||||
cardList = HeroSkillList; // 直接使用HeroSkillList数组
|
||||
break;
|
||||
case cardType.EQUIP:
|
||||
cardList = equip_list;
|
||||
break;
|
||||
default:
|
||||
throw new Error(`Invalid card type: ${type}`);
|
||||
}
|
||||
|
||||
// 确保请求数量不超过可用卡牌数量
|
||||
count = Math.min(count, cardList.length);
|
||||
|
||||
// 打乱数组顺序
|
||||
const shuffled = [...cardList].sort(() => Math.random() - 0.5);
|
||||
|
||||
// 返回指定数量的卡牌
|
||||
return shuffled.slice(0, count).map(uuid => ({
|
||||
type,
|
||||
uuid
|
||||
}));
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import { app } from "electron";
|
||||
|
||||
// 装备类型
|
||||
export enum EquipType {
|
||||
WEAPON = 1, // 武器
|
||||
@@ -5,225 +7,90 @@ export enum EquipType {
|
||||
ACCESSORY = 3 // 饰品
|
||||
}
|
||||
|
||||
// 基础效果类型
|
||||
export enum EffectType {
|
||||
// 基础属性加成
|
||||
export enum EquipAttr {
|
||||
ATK = 1, // 攻击力
|
||||
HP = 3, // 生命值
|
||||
ATK_COUNT = 4, // 攻击个数
|
||||
HP = 2, // 生命值
|
||||
ATK_COUNT = 3, // 攻击个数
|
||||
ATK_SPEED = 4, // 攻击速度
|
||||
CRIT_RATE = 5, // 暴击率
|
||||
CRIT_DMG = 6, // 暴击伤害
|
||||
SKILL_DMG = 7, // 技能伤害提升
|
||||
SKILL_CD = 8, // 技能冷却缩减
|
||||
RANGE = 9 // 攻击范围
|
||||
SKILL_DMG = 5, // 技能伤害提升
|
||||
SKILL_SPEED = 6, // 技能冷却缩减
|
||||
}
|
||||
//装备属性起效对象
|
||||
export enum EquipAttrTarget {
|
||||
ALL = 0, // 所有
|
||||
SELF = 1, // 自身
|
||||
FRIEND = 2, // 伙伴
|
||||
ENEMY = 3, // 敌人
|
||||
}
|
||||
//buff debuff起效技能类型
|
||||
export enum SkillTarget {
|
||||
ALL = 0,
|
||||
FIRE = 1,
|
||||
WATER = 2,
|
||||
EARTH = 3,
|
||||
WIND = 4,
|
||||
LIGHT = 5,
|
||||
DARK = 6,
|
||||
}
|
||||
|
||||
// 套装ID
|
||||
export enum SuitType {
|
||||
DRAGON = 1, // 龙之套装
|
||||
EAGLE = 2, // 鹰眼套装
|
||||
FROST = 3, // 寒冰套装
|
||||
|
||||
export enum EquipQuality {
|
||||
WHITE = 1,
|
||||
GREEN = 2,
|
||||
BLUE = 3,
|
||||
PURPLE = 4,
|
||||
ORANGE = 5,
|
||||
RED = 6,
|
||||
}
|
||||
|
||||
// 基础效果接口
|
||||
export interface Effect {
|
||||
type: EffectType;
|
||||
value: number; // 具体数值
|
||||
isPercent?: boolean;// 是否为百分比加成
|
||||
// 装备属性加成接口
|
||||
export interface EquipAttribute {
|
||||
type: EquipAttr; // 属性类型
|
||||
value: number; // 属性值
|
||||
target?: EquipAttrTarget; // 属性作用目标(可选)
|
||||
}
|
||||
|
||||
// 技能效果接口
|
||||
export interface SkillEffect {
|
||||
skillId: number; // 技能ID
|
||||
effects: {
|
||||
dmgBonus?: number; // 伤害提升
|
||||
cdReduce?: number; // 冷却缩减
|
||||
rangeBonus?: number; // 范围提升
|
||||
special?: string; // 特殊效果描述
|
||||
}
|
||||
// 装备基础接口
|
||||
export interface EquipData {
|
||||
uuid: number; // 装备唯一ID
|
||||
name: string; // 装备名称
|
||||
type: EquipType; // 装备类型
|
||||
quality: EquipQuality; // 装备品质
|
||||
attributes: EquipAttribute[]; // 属性加成列表
|
||||
skills: number[]; // 技能列表
|
||||
buffs: number[]; // buff列表
|
||||
debuffs: number[]; // debuff列表
|
||||
range?: number; // 攻击范围(可选)
|
||||
}
|
||||
|
||||
// 套装效果接口
|
||||
export interface SuitEffect {
|
||||
suitType: SuitType;
|
||||
require: number; // 需要件数
|
||||
effects: Effect[];
|
||||
skillEffects?: SkillEffect[];
|
||||
}
|
||||
|
||||
// 装备配置接口
|
||||
export interface EquipConfig {
|
||||
id: number;
|
||||
name: string;
|
||||
type: EquipType;
|
||||
quality: number; // 1-5星
|
||||
suitType: SuitType;
|
||||
effects: Effect[];
|
||||
skillEffects?: SkillEffect[];
|
||||
description: string;
|
||||
}
|
||||
|
||||
// 套装效果配置
|
||||
export const SuitEffects: { [key in SuitType]: SuitEffect[] } = {
|
||||
[SuitType.DRAGON]: [
|
||||
{
|
||||
suitType: SuitType.DRAGON,
|
||||
require: 2,
|
||||
effects: [
|
||||
{ type: EffectType.ATK, value: 15, isPercent: true }
|
||||
]
|
||||
},
|
||||
{
|
||||
suitType: SuitType.DRAGON,
|
||||
require: 4,
|
||||
effects: [
|
||||
{ type: EffectType.ATK, value: 25, isPercent: true },
|
||||
{ type: EffectType.SKILL_DMG, value: 20, isPercent: true }
|
||||
],
|
||||
skillEffects: [
|
||||
{
|
||||
skillId: 1001, // 龙息技能
|
||||
effects: {
|
||||
dmgBonus: 30,
|
||||
rangeBonus: 20,
|
||||
special: "技能额外造成燃烧效果"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
[SuitType.EAGLE]: [
|
||||
{
|
||||
suitType: SuitType.EAGLE,
|
||||
require: 2,
|
||||
effects: [
|
||||
{ type: EffectType.CRIT_RATE, value: 15, isPercent: true }
|
||||
]
|
||||
},
|
||||
{
|
||||
suitType: SuitType.EAGLE,
|
||||
require: 4,
|
||||
effects: [
|
||||
{ type: EffectType.CRIT_RATE, value: 25, isPercent: true },
|
||||
{ type: EffectType.CRIT_DMG, value: 50, isPercent: true }
|
||||
],
|
||||
skillEffects: [
|
||||
{
|
||||
skillId: 1002, // 精准射击
|
||||
effects: {
|
||||
cdReduce: 30,
|
||||
special: "必定暴击且无视目标50%防御"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
[SuitType.FROST]: [
|
||||
{
|
||||
suitType: SuitType.FROST,
|
||||
require: 2,
|
||||
effects: [
|
||||
{ type: EffectType.ATK_SPEED, value: 10, isPercent: true }
|
||||
]
|
||||
},
|
||||
{
|
||||
suitType: SuitType.FROST,
|
||||
require: 4,
|
||||
effects: [
|
||||
{ type: EffectType.ATK_SPEED, value: 20, isPercent: true },
|
||||
{ type: EffectType.SKILL_CD, value: 15, isPercent: true }
|
||||
],
|
||||
skillEffects: [
|
||||
{
|
||||
skillId: 1003, // 冰霜新星
|
||||
effects: {
|
||||
rangeBonus: 30,
|
||||
special: "技能额外造成冰冻效果"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
// 装备配置数据
|
||||
export const Equips: { [key: number]: EquipConfig } = {
|
||||
// 龙之套装
|
||||
1001: {
|
||||
id: 1001,
|
||||
name: "龙王之刃",
|
||||
type: EquipType.WEAPON,
|
||||
quality: 5,
|
||||
suitType: SuitType.DRAGON,
|
||||
effects: [
|
||||
{ type: EffectType.ATK, value: 100 },
|
||||
{ type: EffectType.SKILL_DMG, value: 15, isPercent: true }
|
||||
],
|
||||
skillEffects: [
|
||||
{
|
||||
skillId: 1001,
|
||||
effects: {
|
||||
dmgBonus: 20
|
||||
}
|
||||
}
|
||||
],
|
||||
description: "传说中由远古巨龙鳞片打造的神器"
|
||||
},
|
||||
1002: {
|
||||
id: 1002,
|
||||
name: "龙鳞胸甲",
|
||||
type: EquipType.ARMOR,
|
||||
quality: 5,
|
||||
suitType: SuitType.DRAGON,
|
||||
effects: [
|
||||
{ type: EffectType.HP, value: 500 },
|
||||
],
|
||||
description: "蕴含龙之力量的铠甲"
|
||||
},
|
||||
|
||||
// 鹰眼套装
|
||||
export const equip_list=[2001,2002]
|
||||
export const EquipInfo: { [key: number]: EquipData } = {
|
||||
2001: {
|
||||
id: 2001,
|
||||
name: "鹰眼瞄准镜",
|
||||
type: EquipType.ACCESSORY,
|
||||
quality: 5,
|
||||
suitType: SuitType.EAGLE,
|
||||
effects: [
|
||||
{ type: EffectType.CRIT_RATE, value: 20, isPercent: true },
|
||||
{ type: EffectType.RANGE, value: 15, isPercent: true }
|
||||
],
|
||||
skillEffects: [
|
||||
{
|
||||
skillId: 1002,
|
||||
effects: {
|
||||
dmgBonus: 15
|
||||
}
|
||||
}
|
||||
],
|
||||
description: "能够看穿敌人弱点的神奇瞄准镜"
|
||||
},
|
||||
|
||||
// 寒冰套装
|
||||
3001: {
|
||||
id: 3001,
|
||||
name: "永冻之杖",
|
||||
uuid: 2001,
|
||||
name: "新手剑",
|
||||
type: EquipType.WEAPON,
|
||||
quality: 5,
|
||||
suitType: SuitType.FROST,
|
||||
effects: [
|
||||
{ type: EffectType.ATK, value: 80 },
|
||||
{ type: EffectType.SKILL_CD, value: 10, isPercent: true }
|
||||
quality: EquipQuality.WHITE,
|
||||
attributes: [
|
||||
{ type: EquipAttr.ATK, value: 10, target: EquipAttrTarget.SELF },
|
||||
{ type: EquipAttr.ATK_SPEED, value: 0.1, target: EquipAttrTarget.SELF }
|
||||
],
|
||||
skillEffects: [
|
||||
{
|
||||
skillId: 1003,
|
||||
effects: {
|
||||
dmgBonus: 25,
|
||||
special: "技能附带20%减速效果"
|
||||
}
|
||||
}
|
||||
skills: [],
|
||||
buffs: [],
|
||||
debuffs: [],
|
||||
range: 1
|
||||
},
|
||||
2002: {
|
||||
uuid: 2002,
|
||||
name: "守护者铠甲",
|
||||
type: EquipType.ARMOR,
|
||||
quality: EquipQuality.GREEN,
|
||||
attributes: [
|
||||
{ type: EquipAttr.HP, value: 100, target: EquipAttrTarget.SELF },
|
||||
{ type: EquipAttr.SKILL_DMG, value: 0.05, target: EquipAttrTarget.SELF }
|
||||
],
|
||||
description: "蕴含着永恒冰霜之力的法杖"
|
||||
skills: [],
|
||||
buffs: [],
|
||||
debuffs: [],
|
||||
}
|
||||
// ... 可以继续添加更多装备
|
||||
}
|
||||
|
||||
|
||||
@@ -35,5 +35,9 @@ export enum GameEvent {
|
||||
MissionEnd = "MissionEnd",
|
||||
MissionComplete = "MissionComplete",//战斗结算完成
|
||||
CastHeroSkill = "CastHeroSkill",
|
||||
|
||||
EquipChange = "EquipChange",
|
||||
EquipAdd = "EquipAdd",
|
||||
EquipRemove = "EquipRemove",
|
||||
EquipSelect = "EquipSelect",
|
||||
EquipSelectEnd = "EquipSelectEnd",
|
||||
}
|
||||
@@ -54,6 +54,25 @@ export enum endType {
|
||||
collision = 3,
|
||||
countEnd = 4,
|
||||
}
|
||||
|
||||
export enum Debuff {
|
||||
STUN = 1, //眩晕
|
||||
SILENCE = 2, //沉默
|
||||
FROST = 3, //冰冻
|
||||
POISON = 4, //中毒
|
||||
BURN = 5, //燃烧
|
||||
BLEED = 6, //流血
|
||||
SLOW = 7, //减速
|
||||
SPEED = 8, //加速
|
||||
}
|
||||
|
||||
export enum Buff {
|
||||
SHIELD = 1, //护盾
|
||||
HEAL = 2, //治疗
|
||||
DOUBLE_ATK = 3, //双倍攻击
|
||||
THREE_ATK = 4, //三倍攻击
|
||||
}
|
||||
|
||||
/*
|
||||
path: 图片地址
|
||||
[debuff] : 0:无,1:冰,2:灼烧,3:眩晕,4:降低攻击,5:降低hp,6:降低防御,7:吸血,8:击退
|
||||
|
||||
@@ -61,7 +61,7 @@ export class Hero extends ecs.Entity {
|
||||
}
|
||||
/** 加载角色 */
|
||||
load(pos: Vec3 = Vec3.ZERO,scale:number = 1,uuid:number=1001,info:any={ap:0,hp:0},fight_pos:number=0) {
|
||||
console.log("英雄加载:",uuid,pos,scale,info)
|
||||
// console.log("英雄加载:",uuid,pos,scale,info)
|
||||
scale = 1
|
||||
let box_group=BoxSet.HERO
|
||||
var path = "game/heros/"+HeroInfo[uuid].path;
|
||||
@@ -70,7 +70,7 @@ export class Hero extends ecs.Entity {
|
||||
var scene = smc.map.MapView.scene;
|
||||
node.parent = scene.entityLayer!.node!
|
||||
node.setPosition(pos)
|
||||
console.log("hero load",pos)
|
||||
// console.log("hero load",pos)
|
||||
var hv = node.getComponent(HeroViewComp)!;
|
||||
let hero= HeroInfo[uuid] // 共用英雄数据
|
||||
hv.scale = scale;
|
||||
|
||||
@@ -119,6 +119,7 @@ export class HeroViewComp extends CCComp {
|
||||
}
|
||||
/* 显示角色血量 */
|
||||
this.node.getChildByName("top").getChildByName("hp").active = true;
|
||||
// console.log("hero parent",this.node.parent)
|
||||
}
|
||||
update(dt: number){
|
||||
if(!smc.mission.play||smc.mission.pause) return
|
||||
@@ -359,10 +360,10 @@ export class HeroViewComp extends CCComp {
|
||||
this.atked_count++;
|
||||
if (isCrit) {
|
||||
this.BUFFCOMP.tooltip(4, damage.toFixed(0), damage);
|
||||
console.log("暴击伤害:" + damage);
|
||||
// console.log("暴击伤害:" + damage);
|
||||
} else {
|
||||
this.BUFFCOMP.tooltip(1, damage.toFixed(0), damage);
|
||||
console.log("普通伤害:" + damage);
|
||||
// console.log("普通伤害:" + damage);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -9,6 +9,8 @@ import { HeroModelComp } from "../hero/HeroModelComp";
|
||||
import { HeroViewComp } from "../hero/HeroViewComp";
|
||||
import { smc } from "../common/SingletonModuleComp";
|
||||
import { HeroSkillList, SkillSet } from "../common/config/SkillSet";
|
||||
import { cardType, getRandomCardUUID } from "../common/config/CardSet";
|
||||
import { EquipInfo } from "../common/config/Equips";
|
||||
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@@ -21,8 +23,8 @@ export class CardComp extends CCComp {
|
||||
is_used:boolean=false;
|
||||
|
||||
onLoad(){
|
||||
this.on(GameEvent.HeroSelect,this.onHeroSelect,this)
|
||||
this.on(GameEvent.HeroSkillSelect,this.onHeroSkillSelect,this)
|
||||
// this.on(GameEvent.HeroSelect,this.hero_select,this)
|
||||
// this.on(GameEvent.HeroSkillSelect,this.hero_skill_select,this)
|
||||
this.on(GameEvent.CardRefresh,this.onCardRefresh,this)
|
||||
}
|
||||
|
||||
@@ -34,11 +36,9 @@ export class CardComp extends CCComp {
|
||||
this.node.getChildByName("Button").active=false
|
||||
this.node.getChildByName("show").active=false
|
||||
}
|
||||
onHeroSelect(event: string, args: any){
|
||||
hero_select(event: string, args: any){
|
||||
this.c_type=0
|
||||
let hero_list =HeroList
|
||||
let x=RandomManager.instance.getRandomInt(0,hero_list.length,1)
|
||||
this.c_uuid=hero_list[x]
|
||||
this.c_uuid=args.uuid
|
||||
console.log("onCardRefresh c_uuid:"+this.c_uuid)
|
||||
this.show_hero(this.c_uuid)
|
||||
this.node.getChildByName("show").active=false
|
||||
@@ -48,12 +48,10 @@ export class CardComp extends CCComp {
|
||||
this.node.getChildByName("Button").active=true
|
||||
}, 0.1);
|
||||
}
|
||||
onHeroSkillSelect(event: string, args: any){
|
||||
hero_skill_select(event: string, args: any){
|
||||
this.c_type=1
|
||||
console.log("card onHeroSkillSelect")
|
||||
let skill_list =HeroSkillList
|
||||
let x=RandomManager.instance.getRandomInt(0,skill_list.length,1)
|
||||
this.c_uuid=skill_list[x]
|
||||
console.log("card hero_skill_select",args)
|
||||
this.c_uuid=args.uuid
|
||||
this.node.getChildByName("show").active=false
|
||||
this.node.getChildByName("anim").getChildByName("up").getComponent(Animation).play('carsup')
|
||||
this.show_skill(this.c_uuid)
|
||||
@@ -62,20 +60,32 @@ export class CardComp extends CCComp {
|
||||
this.node.getChildByName("Button").active=true
|
||||
}, 0.1);
|
||||
}
|
||||
equip_select(event: string, args: any){
|
||||
this.c_type=2
|
||||
this.c_uuid=args.uuid
|
||||
this.node.getChildByName("show").active=false
|
||||
this.node.getChildByName("anim").getChildByName("up").getComponent(Animation).play('carsup')
|
||||
this.show_equip(this.c_uuid)
|
||||
this.scheduleOnce(() => {
|
||||
this.node.getChildByName("show").active=true
|
||||
this.node.getChildByName("Button").active=true
|
||||
}, 0.1);
|
||||
}
|
||||
onCardRefresh(event: string, args: any){
|
||||
this.c_type=0
|
||||
let hero_list =HeroList
|
||||
let x=RandomManager.instance.getRandomInt(0,hero_list.length,1)
|
||||
this.c_uuid=hero_list[x]
|
||||
// console.log("onCardRefresh c_uuid:"+this.c_uuid)
|
||||
this.show_hero(this.c_uuid)
|
||||
this.node.getChildByName("show").active=false
|
||||
this.node.getChildByName("anim").getChildByName("up").getComponent(Animation).play('carsup')
|
||||
this.scheduleOnce(() => {
|
||||
this.node.getChildByName("show").active=true
|
||||
this.node.getChildByName("Button").active=true
|
||||
}, 0.1);
|
||||
|
||||
let card =getRandomCardUUID()
|
||||
console.log("onCardRefresh 开始请求卡牌",card)
|
||||
switch(card.type){
|
||||
case cardType.HERO:
|
||||
this.hero_select(GameEvent.HeroSelect,card)
|
||||
break
|
||||
case cardType.SKILL:
|
||||
this.hero_skill_select(GameEvent.HeroSkillSelect,card)
|
||||
break
|
||||
case cardType.EQUIP:
|
||||
this.equip_select(GameEvent.EquipSelect,card)
|
||||
break
|
||||
}
|
||||
}
|
||||
show_skill(uuid:number){
|
||||
let show=this.node.getChildByName("show")
|
||||
@@ -83,6 +93,11 @@ export class CardComp extends CCComp {
|
||||
show.getChildByName("ap").active=false
|
||||
show.getChildByName("hp").active=false
|
||||
show.getChildByName("mask").getChildByName("skill").active=true
|
||||
show.getChildByName("mask").getChildByName("s_bg").active=true
|
||||
show.getChildByName("mask").getChildByName("equip").active=false
|
||||
show.getChildByName("mask").getChildByName("e_bg").active=false
|
||||
show.getChildByName("mask").getChildByName("hero").active=false
|
||||
show.getChildByName("mask").getChildByName("h_bg").active=false
|
||||
var icon_path = "game/skills/skill_icon"
|
||||
resources.load(icon_path, SpriteAtlas, (err: any, atlas) => {
|
||||
const sprite = show.getChildByName("mask").getChildByName("skill").getComponent(Sprite);
|
||||
@@ -95,6 +110,11 @@ export class CardComp extends CCComp {
|
||||
show.getChildByName("ap").active=true
|
||||
show.getChildByName("hp").active=true
|
||||
show.getChildByName("mask").getChildByName("skill").active=false
|
||||
show.getChildByName("mask").getChildByName("s_bg").active=false
|
||||
show.getChildByName("mask").getChildByName("equip").active=false
|
||||
show.getChildByName("mask").getChildByName("e_bg").active=false
|
||||
show.getChildByName("mask").getChildByName("hero").active=true
|
||||
show.getChildByName("mask").getChildByName("h_bg").active=true
|
||||
show.getChildByName("name").getComponent(Label).string=HeroInfo[uuid].name
|
||||
show.getChildByName("ap").getChildByName("num").getComponent(Label).string=HeroInfo[uuid].ap.toString()
|
||||
show.getChildByName("hp").getChildByName("num").getComponent(Label).string=HeroInfo[uuid].hp.toString()
|
||||
@@ -104,11 +124,29 @@ export class CardComp extends CCComp {
|
||||
// show.getChildByName("lv").getChildByName("num").getComponent(Label).string=HeroInfo[uuid].lv.toString()
|
||||
var icon_path = "game/heros/herois"
|
||||
resources.load(icon_path, SpriteAtlas, (err: any, atlas) => {
|
||||
const sprite = show.getChildByName("mask").getChildByName("icon").getComponent(Sprite);
|
||||
const sprite = show.getChildByName("mask").getChildByName("hero").getComponent(Sprite);
|
||||
sprite.spriteFrame = atlas.getSpriteFrame(HeroInfo[uuid].path);
|
||||
});
|
||||
this.node.getChildByName("Button").getChildByName("Label").getComponent(Label).string=this.check_heros()
|
||||
}
|
||||
show_equip(uuid:number){
|
||||
let show=this.node.getChildByName("show")
|
||||
show.getChildByName("ap").active=false
|
||||
show.getChildByName("hp").active=false
|
||||
show.getChildByName("mask").getChildByName("skill").active=false
|
||||
show.getChildByName("mask").getChildByName("s_bg").active=false
|
||||
show.getChildByName("mask").getChildByName("equip").active=true
|
||||
show.getChildByName("mask").getChildByName("e_bg").active=true
|
||||
show.getChildByName("mask").getChildByName("hero").active=false
|
||||
show.getChildByName("mask").getChildByName("h_bg").active=false
|
||||
show.getChildByName("name").getComponent(Label).string=EquipInfo[uuid].name
|
||||
var icon_path = "game/heros/equips"
|
||||
resources.load(icon_path, SpriteAtlas, (err: any, atlas) => {
|
||||
const sprite = show.getChildByName("mask").getChildByName("equip").getComponent(Sprite);
|
||||
sprite.spriteFrame = atlas.getSpriteFrame(EquipInfo[uuid].uuid.toString());
|
||||
});
|
||||
this.node.getChildByName("Button").getChildByName("Label").getComponent(Label).string=this.check_heros()
|
||||
}
|
||||
check_heros(){
|
||||
// let heros=ecs.query(ecs.allOf(HeroModelComp))
|
||||
// for(let hero of heros){
|
||||
@@ -138,7 +176,8 @@ export class CardComp extends CCComp {
|
||||
oops.message.dispatchEvent(GameEvent.CardsClose)
|
||||
break
|
||||
case 2:
|
||||
oops.message.dispatchEvent(GameEvent.UseCard,{uuid:this.c_uuid})
|
||||
console.log("use_card 装备卡")
|
||||
oops.message.dispatchEvent(GameEvent.EquipAdd,{uuid:this.c_uuid,type:EquipInfo[this.c_uuid].type})
|
||||
oops.message.dispatchEvent(GameEvent.CardsClose)
|
||||
break
|
||||
}
|
||||
|
||||
@@ -2,6 +2,8 @@ import { _decorator, v3 } from "cc";
|
||||
import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
|
||||
import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/module/common/CCComp";
|
||||
import { GameEvent } from "../common/config/GameEvent";
|
||||
import { CardComp } from "./CardComp";
|
||||
import { cardType, getRandomCardsByType } from "../common/config/CardSet";
|
||||
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@@ -9,26 +11,66 @@ const { ccclass, property } = _decorator;
|
||||
@ccclass('CardsCompComp')
|
||||
@ecs.register('CardsComp', false)
|
||||
export class CardsCompComp extends CCComp {
|
||||
card1:any=null
|
||||
card2:any=null
|
||||
card3:any=null
|
||||
card4:any=null
|
||||
card1c:CardComp=null
|
||||
card2c:CardComp=null
|
||||
card3c:CardComp=null
|
||||
card4c:CardComp=null
|
||||
|
||||
/** 视图层逻辑代码分离演示 */
|
||||
onLoad() {
|
||||
// var entity = this.ent as ecs.Entity; // ecs.Entity 可转为当前模块的具体实体对象
|
||||
this.on(GameEvent.HeroSkillSelect, this.show, this);
|
||||
this.on(GameEvent.HeroSkillSelect, this.onHeroSkillSelect, this);
|
||||
this.on(GameEvent.HeroSkillSelectEnd, this.hide, this);
|
||||
this.on(GameEvent.HeroSelect, this.show, this);
|
||||
this.on(GameEvent.HeroSelect, this.onHeroSelect, this);
|
||||
this.on(GameEvent.HeroSelectEnd, this.hide, this);
|
||||
this.on(GameEvent.CardRefresh, this.show, this);
|
||||
this.on(GameEvent.CardRefreshEnd, this.hide, this);
|
||||
this.on(GameEvent.CardsClose, this.hide, this);
|
||||
|
||||
this.card1=this.node.getChildByName("card1")
|
||||
this.card2=this.node.getChildByName("card2")
|
||||
this.card3=this.node.getChildByName("card3")
|
||||
this.card4=this.node.getChildByName("card4")
|
||||
this.card1c=this.card1.getComponent(CardComp)
|
||||
this.card2c=this.card2.getComponent(CardComp)
|
||||
this.card3c=this.card3.getComponent(CardComp)
|
||||
this.card4c=this.card4.getComponent(CardComp)
|
||||
|
||||
|
||||
}
|
||||
onHeroSelect(event: string, args: any){
|
||||
this.show(GameEvent.HeroSelect,args)
|
||||
let list=getRandomCardsByType(cardType.HERO,4)
|
||||
console.log("cards onHeroSelect",list)
|
||||
this.card1c.hero_select(GameEvent.HeroSelect,list[0])
|
||||
this.card2c.hero_select(GameEvent.HeroSelect,list[1])
|
||||
this.card3c.hero_select(GameEvent.HeroSelect,list[2])
|
||||
this.card4c.hero_select(GameEvent.HeroSelect,list[3])
|
||||
}
|
||||
|
||||
onHeroSkillSelect(event: string, args: any){
|
||||
|
||||
this.show(GameEvent.HeroSkillSelect,args)
|
||||
let list=getRandomCardsByType(cardType.SKILL,4)
|
||||
console.log("cards onHeroSkillSelect",list)
|
||||
this.card1c.hero_skill_select(GameEvent.HeroSkillSelect,list[0])
|
||||
this.card2c.hero_skill_select(GameEvent.HeroSkillSelect,list[1])
|
||||
this.card3c.hero_skill_select(GameEvent.HeroSkillSelect,list[2])
|
||||
this.card4c.hero_skill_select(GameEvent.HeroSkillSelect,list[3])
|
||||
}
|
||||
|
||||
show(e:GameEvent,data:any){
|
||||
this.node.setPosition(v3(0,640,0))
|
||||
console.log("cards show",e,this.node.position)
|
||||
// console.log("cards show",e,this.node.position)
|
||||
}
|
||||
|
||||
hide(e:GameEvent,data:any){
|
||||
this.node.setPosition(v3(0,-1000,0))
|
||||
console.log("cards hide",e,this.node.position)
|
||||
// console.log("cards hide",e,this.node.position)
|
||||
}
|
||||
|
||||
/** 视图对象通过 ecs.Entity.remove(ModuleViewComp) 删除组件是触发组件处理自定义释放逻辑 */
|
||||
|
||||
174
assets/script/game/map/EquipSkillComp.ts
Normal file
174
assets/script/game/map/EquipSkillComp.ts
Normal file
@@ -0,0 +1,174 @@
|
||||
import { _decorator, resources, Sprite, SpriteAtlas ,Node, ProgressBar} from "cc";
|
||||
import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
|
||||
import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/module/common/CCComp";
|
||||
import { GameEvent } from "../common/config/GameEvent";
|
||||
import { SkillSet } from "../common/config/SkillSet";
|
||||
import { smc } from "../common/SingletonModuleComp";
|
||||
import { oops } from "db://oops-framework/core/Oops";
|
||||
import { MissionEvent } from "../common/config/MissionEvent";
|
||||
import { EquipsComp } from "./EquipsComp";
|
||||
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
/** 视图层对象 */
|
||||
@ccclass('EquipSkillComp')
|
||||
@ecs.register('EquipSkill', false)
|
||||
export class EquipSkillComp extends CCComp {
|
||||
skill1:any=null
|
||||
skill2:any=null
|
||||
skill3:any=null
|
||||
boxs:Node=null
|
||||
/** 视图层逻辑代码分离演示 */
|
||||
onLoad() {
|
||||
this.on(GameEvent.UseSkillCard, this.get_skill, this);
|
||||
this.on(GameEvent.FightReady,this.fight_ready,this)
|
||||
this.boxs=this.node.getChildByName("boxs")
|
||||
}
|
||||
start(){
|
||||
this.fight_ready()
|
||||
let equips=this.node.getComponent(EquipsComp)
|
||||
}
|
||||
fight_ready(){
|
||||
this.boxs.getChildByName("skill1").getChildByName("icon").active=false
|
||||
this.boxs.getChildByName("skill2").getChildByName("icon").active=false
|
||||
this.boxs.getChildByName("skill3").getChildByName("icon").active=false
|
||||
this.skill1={
|
||||
uuid:0,
|
||||
name:"skill1",
|
||||
type:0, //1 被动 0 主动
|
||||
level:0,
|
||||
quality:0,
|
||||
cd:0,
|
||||
cd_time:0,
|
||||
}
|
||||
this.skill2={
|
||||
uuid:0,
|
||||
name:"skill2",
|
||||
type:0,//
|
||||
level:0,
|
||||
quality:0,
|
||||
cd:0,
|
||||
cd_time:0,
|
||||
}
|
||||
this.skill3={
|
||||
uuid:0,
|
||||
name:"skill3",
|
||||
type:0,//
|
||||
level:0,
|
||||
quality:0,
|
||||
cd:0,
|
||||
cd_time:0,
|
||||
}
|
||||
}
|
||||
update(dt: number): void {
|
||||
if(!smc.mission.play||smc.mission.pause) return
|
||||
if(this.skill1.uuid!=0){
|
||||
if(this.skill1.cd_time>0){
|
||||
this.skill1.cd_time-=dt
|
||||
}else{
|
||||
this.skill1.cd_time=0
|
||||
if(this.skill1.type==1){
|
||||
this.do_skill1()
|
||||
}
|
||||
}
|
||||
this.boxs.getChildByName("skill1").getChildByName("icon").getChildByName("cd").getComponent(ProgressBar).progress=this.skill1.cd_time/this.skill1.cd
|
||||
}
|
||||
if(this.skill2.uuid!=0){
|
||||
if(this.skill2.cd_time>0){
|
||||
this.skill2.cd_time-=dt
|
||||
}else{
|
||||
this.skill2.cd_time=0
|
||||
if(this.skill2.type==1){
|
||||
this.do_skill2()
|
||||
}
|
||||
}
|
||||
this.boxs.getChildByName("skill2").getChildByName("icon").getChildByName("cd").getComponent(ProgressBar).progress=this.skill2.cd_time/this.skill2.cd
|
||||
}
|
||||
if(this.skill3.uuid!=0){
|
||||
if(this.skill3.cd_time>0){
|
||||
this.skill3.cd_time-=dt
|
||||
}else{
|
||||
this.skill3.cd_time=0
|
||||
if(this.skill3.type==1){
|
||||
this.do_skill3()
|
||||
}
|
||||
}
|
||||
this.boxs.getChildByName("skill3").getChildByName("icon").getChildByName("cd").getComponent(ProgressBar).progress=this.skill3.cd_time/this.skill3.cd
|
||||
}
|
||||
}
|
||||
do_skill1(){
|
||||
console.log("do_skill1")
|
||||
this.skill1.cd_time=this.skill1.cd
|
||||
this.do_skill(this.skill1.uuid)
|
||||
}
|
||||
do_skill2(){
|
||||
console.log("do_skill2")
|
||||
this.skill2.cd_time=this.skill2.cd
|
||||
this.do_skill(this.skill2.uuid)
|
||||
}
|
||||
do_skill3(){
|
||||
console.log("do_skill3")
|
||||
this.skill3.cd_time=this.skill3.cd
|
||||
this.do_skill(this.skill3.uuid)
|
||||
}
|
||||
|
||||
do_skill(uuid:number){
|
||||
console.log("出发技能:",uuid)
|
||||
oops.message.dispatchEvent(GameEvent.CastHeroSkill,uuid)
|
||||
}
|
||||
|
||||
get_skill(e:GameEvent,data:any){
|
||||
console.log("get_skill")
|
||||
if(this.skill1.uuid==0){
|
||||
this.skill1.uuid=data.uuid
|
||||
this.skill1.skill_name=SkillSet[data.uuid].name
|
||||
this.skill1.type=1
|
||||
this.skill1.cd=SkillSet[data.uuid].cd
|
||||
this.skill1.cd_time=SkillSet[data.uuid].cd
|
||||
let icon = this.node.getChildByName("boxs").getChildByName("skill1").getChildByName("icon")
|
||||
icon.active=true
|
||||
var icon_path = "game/skills/skill_icon"
|
||||
resources.load(icon_path, SpriteAtlas, (err: any, atlas) => {
|
||||
const sprite = icon.getChildByName("skill").getComponent(Sprite);
|
||||
sprite.spriteFrame = atlas.getSpriteFrame(SkillSet[data.uuid].path);
|
||||
});
|
||||
return
|
||||
}
|
||||
if(this.skill2.uuid==0){
|
||||
this.skill2.uuid=data.uuid
|
||||
this.skill2.skill_name=SkillSet[data.uuid].name
|
||||
this.skill2.type=1
|
||||
this.skill2.cd=SkillSet[data.uuid].cd
|
||||
this.skill2.cd_time=SkillSet[data.uuid].cd
|
||||
let icon = this.node.getChildByName("boxs").getChildByName("skill2").getChildByName("icon")
|
||||
icon.active=true
|
||||
var icon_path = "game/skills/skill_icon"
|
||||
resources.load(icon_path, SpriteAtlas, (err: any, atlas) => {
|
||||
const sprite = icon.getChildByName("skill").getComponent(Sprite);
|
||||
sprite.spriteFrame = atlas.getSpriteFrame(SkillSet[data.uuid].path);
|
||||
});
|
||||
return
|
||||
}
|
||||
if(this.skill3.uuid==0){
|
||||
this.skill3.uuid=data.uuid
|
||||
this.skill3.skill_name=SkillSet[data.uuid].name
|
||||
this.skill3.type=1
|
||||
this.skill3.cd=SkillSet[data.uuid].cd
|
||||
this.skill3.cd_time=SkillSet[data.uuid].cd
|
||||
let icon = this.node.getChildByName("boxs").getChildByName("skill3").getChildByName("icon")
|
||||
icon.active=true
|
||||
var icon_path = "game/skills/skill_icon"
|
||||
resources.load(icon_path, SpriteAtlas, (err: any, atlas) => {
|
||||
const sprite = icon.getChildByName("skill").getComponent(Sprite);
|
||||
sprite.spriteFrame = atlas.getSpriteFrame(SkillSet[data.uuid].path);
|
||||
});
|
||||
return
|
||||
}
|
||||
console.log("技能栏满了")
|
||||
}
|
||||
|
||||
/** 视图对象通过 ecs.Entity.remove(ModuleViewComp) 删除组件是触发组件处理自定义释放逻辑 */
|
||||
reset() {
|
||||
this.node.destroy();
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
"ver": "4.0.23",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "bce99fa9-0a06-4f7b-b378-77a6aa2524b0",
|
||||
"uuid": "b316181b-0323-4100-8d4d-4b68529d3c19",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
@@ -1,261 +1,212 @@
|
||||
import { _decorator, resources, Sprite, SpriteAtlas ,Node, ProgressBar} from "cc";
|
||||
import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
|
||||
import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/module/common/CCComp";
|
||||
import { GameEvent } from "../common/config/GameEvent";
|
||||
import { SkillSet } from "../common/config/SkillSet";
|
||||
import { smc } from "../common/SingletonModuleComp";
|
||||
import { oops } from "db://oops-framework/core/Oops";
|
||||
import { MissionEvent } from "../common/config/MissionEvent";
|
||||
|
||||
import { _decorator, Component, Node, resources, Sprite, SpriteAtlas } from 'cc';
|
||||
import { oops } from 'db://oops-framework/core/Oops';
|
||||
import { GameEvent } from '../common/config/GameEvent';
|
||||
import { smc } from '../common/SingletonModuleComp';
|
||||
import { EquipInfo, EquipType, EquipAttr, EquipAttrTarget } from '../common/config/Equips';
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
/** 视图层对象 */
|
||||
@ccclass('EquipsCompComp')
|
||||
@ecs.register('EquipsComp', false)
|
||||
export class EquipsCompComp extends CCComp {
|
||||
|
||||
@ccclass('EquipsComp')
|
||||
export class EquipsComp extends Component {
|
||||
weapon:any=null
|
||||
armor:any=null
|
||||
ring:any=null
|
||||
accessory:any=null
|
||||
skill1:any=null
|
||||
skill2:any=null
|
||||
skill3:any=null
|
||||
boxs:Node=null
|
||||
attrs:any={
|
||||
hero:{
|
||||
ap:0,
|
||||
hp:0,
|
||||
atk_count:0,
|
||||
atk_speed:0,
|
||||
skill_dmg:0,
|
||||
skill_cd:0,
|
||||
},
|
||||
ally:{
|
||||
ap:0,
|
||||
hp:0,
|
||||
atk_count:0,
|
||||
atk_speed:0,
|
||||
skill_dmg:0,
|
||||
skill_cd:0,
|
||||
},
|
||||
enemy:{
|
||||
ap:0,
|
||||
hp:0,
|
||||
atk_count:0,
|
||||
atk_speed:0,
|
||||
skill_dmg:0,
|
||||
skill_cd:0,
|
||||
},
|
||||
friend:{
|
||||
ap:0,
|
||||
hp:0,
|
||||
atk_count:0,
|
||||
atk_speed:0,
|
||||
skill_dmg:0,
|
||||
skill_cd:0,
|
||||
}
|
||||
}
|
||||
/** 视图层逻辑代码分离演示 */
|
||||
onLoad() {
|
||||
this.on(GameEvent.UseSkillCard, this.get_skill, this);
|
||||
this.on(GameEvent.FightReady,this.fight_ready,this)
|
||||
oops.message.on(GameEvent.FightReady,this.fight_ready,this)
|
||||
oops.message.on(GameEvent.EquipAdd,this.equip_add,this)
|
||||
oops.message.on(GameEvent.EquipRemove,this.equip_remove,this)
|
||||
this.boxs=this.node.getChildByName("boxs")
|
||||
}
|
||||
start(){
|
||||
this.fight_ready()
|
||||
}
|
||||
fight_ready(){
|
||||
this.boxs.getChildByName("skill1").getChildByName("icon").active=false
|
||||
this.boxs.getChildByName("skill2").getChildByName("icon").active=false
|
||||
this.boxs.getChildByName("skill3").getChildByName("icon").active=false
|
||||
this.boxs.getChildByName("weapon").getChildByName("icon").active=false
|
||||
this.boxs.getChildByName("armor").getChildByName("icon").active=false
|
||||
this.boxs.getChildByName("ring").getChildByName("icon").active=false
|
||||
this.boxs.getChildByName("accessory").getChildByName("icon").active=false
|
||||
this.weapon={
|
||||
uuid:0,
|
||||
uuid:2001,
|
||||
name:"weapon",
|
||||
type:"weapon",
|
||||
level:0,
|
||||
quality:0,
|
||||
skill_uuid:0,
|
||||
skill_name:"skill1",
|
||||
skill_type:0,
|
||||
cd:0,
|
||||
cd_time:0,
|
||||
}
|
||||
this.armor={
|
||||
uuid:0,
|
||||
uuid:2002,
|
||||
name:"armor",
|
||||
type:"armor",
|
||||
level:0,
|
||||
quality:0,
|
||||
skill_uuid:0,
|
||||
skill_name:"skill1",
|
||||
skill_type:0,
|
||||
cd:0,
|
||||
cd_time:0,
|
||||
}
|
||||
this.ring={
|
||||
this.accessory={
|
||||
uuid:0,
|
||||
name:"ring",
|
||||
type:"ring",
|
||||
name:"accessory",
|
||||
type:"accessory",
|
||||
level:0,
|
||||
quality:0,
|
||||
skill_uuid:0,
|
||||
skill_name:"skill1",
|
||||
skill_type:0,
|
||||
cd:0,
|
||||
cd_time:0,
|
||||
}
|
||||
this.skill1={
|
||||
uuid:0,
|
||||
name:"skill1",
|
||||
type:0, //1 被动 0 主动
|
||||
level:0,
|
||||
quality:0,
|
||||
cd:0,
|
||||
cd_time:0,
|
||||
this.count_attrs()
|
||||
}
|
||||
equip_add(e:GameEvent,data:any){
|
||||
console.log("equip_add",data)
|
||||
if(data.type==EquipType.WEAPON){
|
||||
this.weapon.uuid=data.uuid
|
||||
this.weapon.name=data.name
|
||||
this.weapon.type=data.type
|
||||
this.weapon.level=data.level
|
||||
this.show_weapon(data.uuid)
|
||||
}
|
||||
this.skill2={
|
||||
uuid:0,
|
||||
name:"skill2",
|
||||
type:0,//
|
||||
level:0,
|
||||
quality:0,
|
||||
cd:0,
|
||||
cd_time:0,
|
||||
if(data.type==EquipType.ARMOR){
|
||||
this.armor.uuid=data.uuid
|
||||
this.armor.name=data.name
|
||||
this.armor.type=data.type
|
||||
this.armor.level=data.level
|
||||
this.show_armor(data.uuid)
|
||||
}
|
||||
this.skill3={
|
||||
uuid:0,
|
||||
name:"skill3",
|
||||
type:0,//
|
||||
level:0,
|
||||
quality:0,
|
||||
cd:0,
|
||||
cd_time:0,
|
||||
if(data.type==EquipType.ACCESSORY){
|
||||
this.accessory.uuid=data.uuid
|
||||
this.accessory.name=data.name
|
||||
this.accessory.type=data.type
|
||||
this.accessory.level=data.level
|
||||
this.show_accessory(data.uuid)
|
||||
}
|
||||
}
|
||||
show_weapon(uuid:number){
|
||||
let icon = this.node.getChildByName("boxs").getChildByName("weapon").getChildByName("icon")
|
||||
icon.active=true
|
||||
var icon_path = "game/heros/equips"
|
||||
resources.load(icon_path, SpriteAtlas, (err: any, atlas) => {
|
||||
const sprite = icon.getChildByName("icon").getComponent(Sprite);
|
||||
sprite.spriteFrame = atlas.getSpriteFrame(uuid.toString());
|
||||
});
|
||||
|
||||
}
|
||||
show_armor(uuid:number){
|
||||
let icon = this.node.getChildByName("boxs").getChildByName("armor").getChildByName("icon")
|
||||
icon.active=true
|
||||
var icon_path = "game/heros/equips"
|
||||
resources.load(icon_path, SpriteAtlas, (err: any, atlas) => {
|
||||
const sprite = icon.getChildByName("icon").getComponent(Sprite);
|
||||
sprite.spriteFrame = atlas.getSpriteFrame(uuid.toString());
|
||||
});
|
||||
}
|
||||
show_accessory(uuid:number){
|
||||
let icon = this.node.getChildByName("boxs").getChildByName("accessory").getChildByName("icon")
|
||||
icon.active=true
|
||||
var icon_path = "game/heros/equips"
|
||||
resources.load(icon_path, SpriteAtlas, (err: any, atlas) => {
|
||||
const sprite = icon.getChildByName("icon").getComponent(Sprite);
|
||||
sprite.spriteFrame = atlas.getSpriteFrame(uuid.toString());
|
||||
});
|
||||
}
|
||||
count_attrs(){
|
||||
// 重置所有属性
|
||||
this.reset_attrs();
|
||||
|
||||
// 获取所有装备的属性
|
||||
let weapon_attrs = this.weapon.uuid ? EquipInfo[this.weapon.uuid]?.attributes || [] : [];
|
||||
let armor_attrs = this.armor.uuid ? EquipInfo[this.armor.uuid]?.attributes || [] : [];
|
||||
let accessory_attrs = this.accessory.uuid ? EquipInfo[this.accessory.uuid]?.attributes || [] : [];
|
||||
|
||||
// 合并所有装备属性
|
||||
const allAttrs = [...weapon_attrs, ...armor_attrs, ...accessory_attrs];
|
||||
|
||||
// 计算每个目标的属性加成
|
||||
allAttrs.forEach(attr => {
|
||||
const target = attr.target || EquipAttrTarget.ALL;
|
||||
const targetKey = this.getTargetKey(target);
|
||||
|
||||
if (targetKey) {
|
||||
switch (attr.type) {
|
||||
case EquipAttr.ATK:
|
||||
this.attrs[targetKey].ap += attr.value;
|
||||
break;
|
||||
case EquipAttr.HP:
|
||||
this.attrs[targetKey].hp += attr.value;
|
||||
break;
|
||||
case EquipAttr.ATK_COUNT:
|
||||
this.attrs[targetKey].atk_count += attr.value;
|
||||
break;
|
||||
case EquipAttr.ATK_SPEED:
|
||||
this.attrs[targetKey].atk_speed += attr.value;
|
||||
break;
|
||||
case EquipAttr.SKILL_DMG:
|
||||
this.attrs[targetKey].skill_dmg += attr.value;
|
||||
break;
|
||||
case EquipAttr.SKILL_SPEED:
|
||||
this.attrs[targetKey].skill_cd += attr.value;
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
console.log("count_attrs",this.attrs)
|
||||
}
|
||||
|
||||
// 重置所有属性为0
|
||||
private reset_attrs() {
|
||||
Object.keys(this.attrs).forEach(key => {
|
||||
Object.keys(this.attrs[key]).forEach(attrKey => {
|
||||
this.attrs[key][attrKey] = 0;
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
// 根据目标类型获取对应的key
|
||||
private getTargetKey(target: EquipAttrTarget): string | null {
|
||||
switch (target) {
|
||||
case EquipAttrTarget.ALL:
|
||||
return 'hero'; // 默认作用于英雄
|
||||
case EquipAttrTarget.SELF:
|
||||
return 'hero';
|
||||
case EquipAttrTarget.FRIEND:
|
||||
return 'friend';
|
||||
case EquipAttrTarget.ENEMY:
|
||||
return 'enemy';
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
equip_remove(e:GameEvent,data:any){
|
||||
console.log("equip_remove",data)
|
||||
}
|
||||
update(dt: number): void {
|
||||
if(!smc.mission.play||smc.mission.pause) return
|
||||
if(this.skill1.uuid!=0){
|
||||
if(this.skill1.cd_time>0){
|
||||
this.skill1.cd_time-=dt
|
||||
}else{
|
||||
this.skill1.cd_time=0
|
||||
if(this.skill1.type==1){
|
||||
this.do_skill1()
|
||||
}
|
||||
}
|
||||
this.boxs.getChildByName("skill1").getChildByName("icon").getChildByName("cd").getComponent(ProgressBar).progress=this.skill1.cd_time/this.skill1.cd
|
||||
}
|
||||
if(this.skill2.uuid!=0){
|
||||
if(this.skill2.cd_time>0){
|
||||
this.skill2.cd_time-=dt
|
||||
}else{
|
||||
this.skill2.cd_time=0
|
||||
if(this.skill2.type==1){
|
||||
this.do_skill2()
|
||||
}
|
||||
}
|
||||
this.boxs.getChildByName("skill2").getChildByName("icon").getChildByName("cd").getComponent(ProgressBar).progress=this.skill2.cd_time/this.skill2.cd
|
||||
}
|
||||
if(this.skill3.uuid!=0){
|
||||
if(this.skill3.cd_time>0){
|
||||
this.skill3.cd_time-=dt
|
||||
}else{
|
||||
this.skill3.cd_time=0
|
||||
if(this.skill3.type==1){
|
||||
this.do_skill3()
|
||||
}
|
||||
}
|
||||
this.boxs.getChildByName("skill3").getChildByName("icon").getChildByName("cd").getComponent(ProgressBar).progress=this.skill3.cd_time/this.skill3.cd
|
||||
}
|
||||
if(this.weapon.skill_uuid!=0){
|
||||
if(this.weapon.cd_time>0){
|
||||
this.weapon.cd_time-=dt
|
||||
}else{
|
||||
this.weapon.cd_time=0
|
||||
if(this.weapon.skill_type==1){
|
||||
this.do_weapon()
|
||||
}
|
||||
}
|
||||
this.boxs.getChildByName("weapon").getChildByName("icon").getChildByName("cd").getComponent(ProgressBar).progress=this.weapon.cd_time/this.weapon.cd
|
||||
}
|
||||
if(this.armor.skill_uuid!=0){
|
||||
if(this.armor.cd_time>0){
|
||||
this.armor.cd_time-=dt
|
||||
}else{
|
||||
this.armor.cd_time=0
|
||||
if(this.armor.skill_type==1){
|
||||
this.do_armor()
|
||||
}
|
||||
}
|
||||
this.boxs.getChildByName("armor").getChildByName("icon").getChildByName("cd").getComponent(ProgressBar).progress=this.armor.cd_time/this.armor.cd
|
||||
}
|
||||
if(this.ring.skill_uuid!=0){
|
||||
if(this.ring.cd_time>0){
|
||||
this.ring.cd_time-=dt
|
||||
}else{
|
||||
this.ring.cd_time=0
|
||||
if(this.ring.skill_type==1){
|
||||
this.do_ring()
|
||||
}
|
||||
}
|
||||
this.boxs.getChildByName("ring").getChildByName("icon").getChildByName("cd").getComponent(ProgressBar).progress=this.ring.cd_time/this.ring.cd
|
||||
}
|
||||
}
|
||||
do_weapon(){
|
||||
console.log("do_weapon")
|
||||
this.weapon.cd_time=this.weapon.cd
|
||||
this.do_skill(this.weapon.skill_uuid)
|
||||
}
|
||||
do_armor(){
|
||||
console.log("do_armor")
|
||||
this.armor.cd_time=this.armor.cd
|
||||
this.do_skill(this.armor.skill_uuid)
|
||||
}
|
||||
do_ring(){
|
||||
console.log("do_ring")
|
||||
this.ring.cd_time=this.ring.cd
|
||||
this.do_skill(this.ring.skill_uuid)
|
||||
}
|
||||
do_skill1(){
|
||||
console.log("do_skill1")
|
||||
this.skill1.cd_time=this.skill1.cd
|
||||
this.do_skill(this.skill1.uuid)
|
||||
}
|
||||
do_skill2(){
|
||||
console.log("do_skill2")
|
||||
this.skill2.cd_time=this.skill2.cd
|
||||
this.do_skill(this.skill2.uuid)
|
||||
}
|
||||
do_skill3(){
|
||||
console.log("do_skill3")
|
||||
this.skill3.cd_time=this.skill3.cd
|
||||
this.do_skill(this.skill3.uuid)
|
||||
}
|
||||
do_skill(uuid:number){
|
||||
console.log("出发技能:",uuid)
|
||||
oops.message.dispatchEvent(GameEvent.CastHeroSkill,uuid)
|
||||
}
|
||||
get_skill(e:GameEvent,data:any){
|
||||
console.log("get_skill")
|
||||
if(this.skill1.uuid==0){
|
||||
this.skill1.uuid=data.uuid
|
||||
this.skill1.skill_name=SkillSet[data.uuid].name
|
||||
this.skill1.type=1
|
||||
this.skill1.cd=SkillSet[data.uuid].cd
|
||||
this.skill1.cd_time=SkillSet[data.uuid].cd
|
||||
let icon = this.node.getChildByName("boxs").getChildByName("skill1").getChildByName("icon")
|
||||
icon.active=true
|
||||
var icon_path = "game/skills/skill_icon"
|
||||
resources.load(icon_path, SpriteAtlas, (err: any, atlas) => {
|
||||
const sprite = icon.getChildByName("skill").getComponent(Sprite);
|
||||
sprite.spriteFrame = atlas.getSpriteFrame(SkillSet[data.uuid].path);
|
||||
});
|
||||
return
|
||||
}
|
||||
if(this.skill2.uuid==0){
|
||||
this.skill2.uuid=data.uuid
|
||||
this.skill2.skill_name=SkillSet[data.uuid].name
|
||||
this.skill2.type=1
|
||||
this.skill2.cd=SkillSet[data.uuid].cd
|
||||
this.skill2.cd_time=SkillSet[data.uuid].cd
|
||||
let icon = this.node.getChildByName("boxs").getChildByName("skill2").getChildByName("icon")
|
||||
icon.active=true
|
||||
var icon_path = "game/skills/skill_icon"
|
||||
resources.load(icon_path, SpriteAtlas, (err: any, atlas) => {
|
||||
const sprite = icon.getChildByName("skill").getComponent(Sprite);
|
||||
sprite.spriteFrame = atlas.getSpriteFrame(SkillSet[data.uuid].path);
|
||||
});
|
||||
return
|
||||
}
|
||||
if(this.skill3.uuid==0){
|
||||
this.skill3.uuid=data.uuid
|
||||
this.skill3.skill_name=SkillSet[data.uuid].name
|
||||
this.skill3.type=1
|
||||
this.skill3.cd=SkillSet[data.uuid].cd
|
||||
this.skill3.cd_time=SkillSet[data.uuid].cd
|
||||
let icon = this.node.getChildByName("boxs").getChildByName("skill3").getChildByName("icon")
|
||||
icon.active=true
|
||||
var icon_path = "game/skills/skill_icon"
|
||||
resources.load(icon_path, SpriteAtlas, (err: any, atlas) => {
|
||||
const sprite = icon.getChildByName("skill").getComponent(Sprite);
|
||||
sprite.spriteFrame = atlas.getSpriteFrame(SkillSet[data.uuid].path);
|
||||
});
|
||||
return
|
||||
}
|
||||
console.log("技能栏满了")
|
||||
}
|
||||
|
||||
/** 视图对象通过 ecs.Entity.remove(ModuleViewComp) 删除组件是触发组件处理自定义释放逻辑 */
|
||||
reset() {
|
||||
this.node.destroy();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"ver": "4.0.23",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "b316181b-0323-4100-8d4d-4b68529d3c19",
|
||||
"uuid": "a8fa7cb8-6ae9-42bd-8b54-7510b5757576",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
|
||||
70
assets/script/game/map/FightConComp.ts
Normal file
70
assets/script/game/map/FightConComp.ts
Normal file
@@ -0,0 +1,70 @@
|
||||
import { _decorator, Component, Node } from 'cc';
|
||||
import { oops } from 'db://oops-framework/core/Oops';
|
||||
import { GameEvent } from '../common/config/GameEvent';
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@ccclass('FightConComp')
|
||||
export class FightConComp extends Component {
|
||||
attrs:any={
|
||||
hero:{
|
||||
ap:0,
|
||||
hp:0,
|
||||
atk_count:0,
|
||||
atk_speed:0,
|
||||
skill_dmg:0,
|
||||
skill_cd:0,
|
||||
},
|
||||
ally:{
|
||||
ap:0,
|
||||
hp:0,
|
||||
atk_count:0,
|
||||
atk_speed:0,
|
||||
skill_dmg:0,
|
||||
skill_cd:0,
|
||||
},
|
||||
enemy:{
|
||||
ap:0,
|
||||
hp:0,
|
||||
atk_count:0,
|
||||
atk_speed:0,
|
||||
skill_dmg:0,
|
||||
skill_cd:0,
|
||||
},
|
||||
friend:{
|
||||
ap:0,
|
||||
hp:0,
|
||||
atk_count:0,
|
||||
atk_speed:0,
|
||||
skill_dmg:0,
|
||||
skill_cd:0,
|
||||
}
|
||||
}
|
||||
onLoad(){
|
||||
// console.log("fight con start")
|
||||
oops.message.on(GameEvent.EquipChange,this.equip_change,this)
|
||||
oops.message.on(GameEvent.FightReady,this.fight_ready,this)
|
||||
}
|
||||
|
||||
equip_change(e:GameEvent,equip:any){
|
||||
this.attrs.hero=equip.hero
|
||||
this.attrs.ally=equip.ally
|
||||
this.attrs.enemy=equip.enemy
|
||||
this.attrs.friend=equip.friend
|
||||
}
|
||||
fight_ready(e:GameEvent){
|
||||
this.attrs.hero=this.attrs.ally=this.attrs.enemy=this.attrs.friend={
|
||||
ap:0,
|
||||
hp:0,
|
||||
atk_count:0,
|
||||
atk_speed:0,
|
||||
skill_dmg:0,
|
||||
skill_cd:0,
|
||||
}
|
||||
}
|
||||
|
||||
update(deltaTime: number) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
9
assets/script/game/map/FightConComp.ts.meta
Normal file
9
assets/script/game/map/FightConComp.ts.meta
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "4.0.23",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "7aec9f6c-509f-4b5d-9993-76ba73b5bdc8",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
||||
@@ -1,115 +0,0 @@
|
||||
import { _decorator, Label, ProgressBar, resources, Sprite, SpriteAtlas, v3, Vec3 } from "cc";
|
||||
import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
|
||||
import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/module/common/CCComp";
|
||||
import { CdType, SkillSet } from "../common/config/SkillSet";
|
||||
import { BoxSet } from "../common/config/BoxSet";
|
||||
import { smc } from "../common/SingletonModuleComp";
|
||||
import { Skill } from "../skills/Skill";
|
||||
import { GameEvent } from "../common/config/GameEvent";
|
||||
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
/** 视图层对象 */
|
||||
@ccclass('MSkillComp')
|
||||
@ecs.register('MSkillComp', false)
|
||||
export class MSkillComp extends CCComp {
|
||||
/** 技能队列 */
|
||||
private skillQueue: Array<{
|
||||
uuid: number,
|
||||
startPos: Vec3,
|
||||
targetPos: Vec3,
|
||||
group: number,
|
||||
count: number,
|
||||
cd: number,
|
||||
cdTimer: number // 改用累计时间计时器
|
||||
}> = [];
|
||||
/** 常驻技能 */
|
||||
MSkill:any={
|
||||
uuid:0,
|
||||
CdType:0,
|
||||
cd:0,
|
||||
count:0,
|
||||
cdTimer:0
|
||||
}
|
||||
/** 技能队列 */
|
||||
protected onLoad(): void {
|
||||
this.on(GameEvent.MissionSkill, this.skill_event, this);
|
||||
}
|
||||
start() {
|
||||
|
||||
}
|
||||
init(){
|
||||
|
||||
|
||||
}
|
||||
protected update(dt: number): void {
|
||||
if (!smc.mission.play || smc.mission.pause) {
|
||||
return;
|
||||
}
|
||||
|
||||
// 处理技能队列
|
||||
this.processSkillQueue(dt);
|
||||
}
|
||||
skill_event(e: any) {
|
||||
// 技能加入队列
|
||||
const { uuid, startPos, targetPos, group, count = 1, cd = 0 } = e;
|
||||
this.skillQueue.push({
|
||||
uuid,
|
||||
startPos,
|
||||
targetPos,
|
||||
group,
|
||||
count,
|
||||
cd,
|
||||
cdTimer: 0 // 初始化计时器为0
|
||||
});
|
||||
}
|
||||
private processSkillQueue(dt: number) {
|
||||
// 遍历技能队列
|
||||
for (let i = this.skillQueue.length - 1; i >= 0; i--) {
|
||||
const skill = this.skillQueue[i];
|
||||
|
||||
// 累加计时器
|
||||
skill.cdTimer += dt;
|
||||
|
||||
// 检查CD (将cd从毫秒转换为秒进行比较)
|
||||
if (skill.cdTimer < skill.cd * 0.001) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// 释放技能
|
||||
this.doSkill(
|
||||
skill.uuid,
|
||||
skill.startPos,
|
||||
skill.targetPos,
|
||||
skill.group
|
||||
);
|
||||
|
||||
// 重置CD计时器
|
||||
skill.cdTimer = 0;
|
||||
|
||||
// 减少技能次数
|
||||
skill.count--;
|
||||
|
||||
// 如果技能次数用完,从队列中移除
|
||||
if (skill.count <= 0) {
|
||||
this.skillQueue.splice(i, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
private doSkill(uuid: number, start_pos: Vec3, target_pos: Vec3, group: number) {
|
||||
const skillEntity = ecs.getEntity<Skill>(Skill);
|
||||
skillEntity.load(
|
||||
start_pos, // 起始位置
|
||||
group, // 阵营
|
||||
this.node.parent, // 父节点
|
||||
uuid, // 技能ID
|
||||
target_pos, // 目标位置
|
||||
);
|
||||
}
|
||||
|
||||
/** 视图对象通过 ecs.Entity.remove(ModuleViewComp) 删除组件是触发组件处理自定义释放逻辑 */
|
||||
reset() {
|
||||
// 清空技能队列
|
||||
this.skillQueue = [];
|
||||
}
|
||||
}
|
||||
@@ -19,20 +19,6 @@ export class MissionComp extends CCComp {
|
||||
reward:number = 0;
|
||||
reward_num:number = 0;
|
||||
GlodAddTimer:Timer = new Timer(1);
|
||||
mission_data:any={
|
||||
gold:10,//金币
|
||||
refresh_gold:1,//刷新金币
|
||||
refrsh_time:1, //刷新时间
|
||||
call_gold:3,//召唤金币
|
||||
add_gold:1,//金币增加
|
||||
change_gold:1,//金币变化
|
||||
exp:0,//经验
|
||||
skp:0,//技能点
|
||||
box:0,//宝箱
|
||||
energy:0,//能量
|
||||
hp:0,//血量
|
||||
ap:0,//攻击
|
||||
}
|
||||
onLoad(){
|
||||
this.on(GameEvent.MissionStart,this.mission_start,this)
|
||||
this.on(GameEvent.FightEnd,this.fight_end,this)
|
||||
@@ -118,7 +104,7 @@ export class MissionComp extends CCComp {
|
||||
//局内数据初始化
|
||||
console.log("局内数据初始化")
|
||||
smc.mission.play = true;
|
||||
smc.vmdata.mission_data =MissionData
|
||||
smc.vmdata.mission_data = JSON.parse(JSON.stringify(MissionData));
|
||||
this.GlodAddTimer=new Timer(smc.vmdata.mission_data.refrsh_time)
|
||||
}
|
||||
|
||||
|
||||
@@ -99,7 +99,7 @@ export class MissionHeroCompComp extends CCComp {
|
||||
let hero = ecs.getEntity<Hero>(Hero);
|
||||
let scale = 1
|
||||
let pos:Vec3 = this.start_pos[fight_pos].pos;
|
||||
console.log("hero load0",pos,this.start_pos)
|
||||
// console.log("hero load0",pos,this.start_pos)
|
||||
hero.load(pos,scale,uuid,info,fight_pos);
|
||||
oops.message.dispatchEvent(GameEvent.HeroSelectEnd)
|
||||
this.current_hero_uuid=0
|
||||
|
||||
@@ -22,24 +22,13 @@ export default class SkillLayer extends Component {
|
||||
@property(Prefab)
|
||||
light: Prefab = null;
|
||||
onLoad(){
|
||||
oops.message.on("monster_load", this.doMonsterLoad, this);
|
||||
oops.message.on("hero_load", this.doHeroLoad, this);
|
||||
oops.message.on("do_use_skill", this.doSkill, this);
|
||||
// oops.message.on("do_use_skill", this.doSkill, this);
|
||||
|
||||
}
|
||||
doSkill(){
|
||||
// console.log("doSkill")
|
||||
}
|
||||
doMonsterLoad(){
|
||||
// const light = instantiate(this.light);
|
||||
// light.setPosition(300,-30,0);
|
||||
// this.node.addChild(light);
|
||||
}
|
||||
doHeroLoad(){
|
||||
// const light = instantiate(this.light);
|
||||
// light.setPosition(BoxSet.HERO_START,BoxSet.GAME_LINE,0);
|
||||
// this.node.addChild(light);
|
||||
}
|
||||
|
||||
update(dt: number) {
|
||||
// this.timer.update(dt)
|
||||
// if (this.timer.update(dt))
|
||||
|
||||
@@ -57,7 +57,7 @@ export class Skill extends ecs.Entity {
|
||||
skillComp.group = group;
|
||||
skillComp.fac= group==BoxSet.HERO?0:1;
|
||||
|
||||
console.log(config.sp_name+"技能配置",skillComp);
|
||||
// console.log(config.sp_name+"技能配置",skillComp);
|
||||
// 初始化动画名称
|
||||
skillComp.animName = config.animName; // 从配置获取动画名称
|
||||
this.add(skillComp);
|
||||
|
||||
@@ -95,6 +95,7 @@ export class SkillCom extends CCComp {
|
||||
this.distance_y = this.speed * Math.sin(radians);
|
||||
|
||||
this.startMovement();
|
||||
// console.log("skill start",this.node.parent)
|
||||
}
|
||||
onBeginContact (seCol: Collider2D, oCol: Collider2D) {
|
||||
// console.log(this.scale+"碰撞开始 ",seCol,oCol);
|
||||
|
||||
@@ -66,7 +66,7 @@ export class TooltipCom extends CCComp {
|
||||
},0.5)
|
||||
break
|
||||
}
|
||||
console.log("TooltipView start:",this.node.getSiblingIndex());
|
||||
// console.log("TooltipView start:",this.node.getSiblingIndex());
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user