清理 老的 没用的组件
This commit is contained in:
@@ -1,48 +0,0 @@
|
|||||||
|
|
||||||
5chest.png
|
|
||||||
size: 963,537
|
|
||||||
format: RGBA8888
|
|
||||||
filter: Linear,Linear
|
|
||||||
repeat: none
|
|
||||||
light1
|
|
||||||
rotate: true
|
|
||||||
xy: 520, 214
|
|
||||||
size: 321, 327
|
|
||||||
orig: 373, 362
|
|
||||||
offset: 26, 24
|
|
||||||
index: -1
|
|
||||||
light2
|
|
||||||
rotate: true
|
|
||||||
xy: 849, 315
|
|
||||||
size: 220, 112
|
|
||||||
orig: 220, 112
|
|
||||||
offset: 0, 0
|
|
||||||
index: -1
|
|
||||||
lv5_box
|
|
||||||
rotate: false
|
|
||||||
xy: 482, 3
|
|
||||||
size: 466, 209
|
|
||||||
orig: 516, 280
|
|
||||||
offset: 20, 35
|
|
||||||
index: -1
|
|
||||||
lv5_top1
|
|
||||||
rotate: false
|
|
||||||
xy: 2, 2
|
|
||||||
size: 478, 251
|
|
||||||
orig: 516, 280
|
|
||||||
offset: 14, 18
|
|
||||||
index: -1
|
|
||||||
lv5_top2
|
|
||||||
rotate: false
|
|
||||||
xy: 2, 255
|
|
||||||
size: 516, 280
|
|
||||||
orig: 516, 280
|
|
||||||
offset: 0, 0
|
|
||||||
index: -1
|
|
||||||
star
|
|
||||||
rotate: false
|
|
||||||
xy: 849, 272
|
|
||||||
size: 40, 41
|
|
||||||
orig: 49, 52
|
|
||||||
offset: 5, 6
|
|
||||||
index: -1
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
{
|
|
||||||
"ver": "1.0.1",
|
|
||||||
"importer": "*",
|
|
||||||
"imported": true,
|
|
||||||
"uuid": "af0f0d7d-8d42-4685-bdbc-64efffcb7b2c",
|
|
||||||
"files": [
|
|
||||||
".atlas",
|
|
||||||
".json"
|
|
||||||
],
|
|
||||||
"subMetas": {},
|
|
||||||
"userData": {}
|
|
||||||
}
|
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -1,11 +0,0 @@
|
|||||||
{
|
|
||||||
"ver": "1.2.6",
|
|
||||||
"importer": "spine-data",
|
|
||||||
"imported": true,
|
|
||||||
"uuid": "048e5469-2496-4703-b9d7-1460936024d9",
|
|
||||||
"files": [
|
|
||||||
".json"
|
|
||||||
],
|
|
||||||
"subMetas": {},
|
|
||||||
"userData": {}
|
|
||||||
}
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 672 KiB |
@@ -1,42 +0,0 @@
|
|||||||
{
|
|
||||||
"ver": "1.0.26",
|
|
||||||
"importer": "image",
|
|
||||||
"imported": true,
|
|
||||||
"uuid": "52188c62-fd2f-477b-9fa5-f6fcc6a9cd32",
|
|
||||||
"files": [
|
|
||||||
".json",
|
|
||||||
".png"
|
|
||||||
],
|
|
||||||
"subMetas": {
|
|
||||||
"6c48a": {
|
|
||||||
"importer": "texture",
|
|
||||||
"uuid": "52188c62-fd2f-477b-9fa5-f6fcc6a9cd32@6c48a",
|
|
||||||
"displayName": "5chest",
|
|
||||||
"id": "6c48a",
|
|
||||||
"name": "texture",
|
|
||||||
"userData": {
|
|
||||||
"wrapModeS": "repeat",
|
|
||||||
"wrapModeT": "repeat",
|
|
||||||
"minfilter": "linear",
|
|
||||||
"magfilter": "linear",
|
|
||||||
"mipfilter": "none",
|
|
||||||
"anisotropy": 0,
|
|
||||||
"isUuid": true,
|
|
||||||
"imageUuidOrDatabaseUri": "52188c62-fd2f-477b-9fa5-f6fcc6a9cd32",
|
|
||||||
"visible": false
|
|
||||||
},
|
|
||||||
"ver": "1.0.22",
|
|
||||||
"imported": true,
|
|
||||||
"files": [
|
|
||||||
".json"
|
|
||||||
],
|
|
||||||
"subMetas": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"userData": {
|
|
||||||
"hasAlpha": true,
|
|
||||||
"type": "texture",
|
|
||||||
"fixAlphaTransparencyArtifacts": false,
|
|
||||||
"redirect": "52188c62-fd2f-477b-9fa5-f6fcc6a9cd32@6c48a"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,950 +0,0 @@
|
|||||||
[
|
|
||||||
{
|
|
||||||
"__type__": "cc.Prefab",
|
|
||||||
"_name": "Lifes",
|
|
||||||
"_objFlags": 0,
|
|
||||||
"__editorExtras__": {},
|
|
||||||
"_native": "",
|
|
||||||
"data": {
|
|
||||||
"__id__": 1
|
|
||||||
},
|
|
||||||
"optimizationPolicy": 0,
|
|
||||||
"persistent": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__type__": "cc.Node",
|
|
||||||
"_name": "Lifes",
|
|
||||||
"_objFlags": 0,
|
|
||||||
"__editorExtras__": {},
|
|
||||||
"_parent": null,
|
|
||||||
"_children": [
|
|
||||||
{
|
|
||||||
"__id__": 2
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__id__": 14
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__id__": 26
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"_active": true,
|
|
||||||
"_components": [
|
|
||||||
{
|
|
||||||
"__id__": 38
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__id__": 40
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__id__": 42
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"_prefab": {
|
|
||||||
"__id__": 44
|
|
||||||
},
|
|
||||||
"_lpos": {
|
|
||||||
"__type__": "cc.Vec3",
|
|
||||||
"x": -240,
|
|
||||||
"y": 57.811,
|
|
||||||
"z": 0
|
|
||||||
},
|
|
||||||
"_lrot": {
|
|
||||||
"__type__": "cc.Quat",
|
|
||||||
"x": 0,
|
|
||||||
"y": 0,
|
|
||||||
"z": 0,
|
|
||||||
"w": 1
|
|
||||||
},
|
|
||||||
"_lscale": {
|
|
||||||
"__type__": "cc.Vec3",
|
|
||||||
"x": 1,
|
|
||||||
"y": 1,
|
|
||||||
"z": 1
|
|
||||||
},
|
|
||||||
"_mobility": 0,
|
|
||||||
"_layer": 1,
|
|
||||||
"_euler": {
|
|
||||||
"__type__": "cc.Vec3",
|
|
||||||
"x": 0,
|
|
||||||
"y": 0,
|
|
||||||
"z": 0
|
|
||||||
},
|
|
||||||
"_id": ""
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__type__": "cc.Node",
|
|
||||||
"_name": "life",
|
|
||||||
"_objFlags": 0,
|
|
||||||
"__editorExtras__": {},
|
|
||||||
"_parent": {
|
|
||||||
"__id__": 1
|
|
||||||
},
|
|
||||||
"_children": [
|
|
||||||
{
|
|
||||||
"__id__": 3
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"_active": true,
|
|
||||||
"_components": [
|
|
||||||
{
|
|
||||||
"__id__": 11
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"_prefab": {
|
|
||||||
"__id__": 13
|
|
||||||
},
|
|
||||||
"_lpos": {
|
|
||||||
"__type__": "cc.Vec3",
|
|
||||||
"x": -75,
|
|
||||||
"y": 0,
|
|
||||||
"z": 0
|
|
||||||
},
|
|
||||||
"_lrot": {
|
|
||||||
"__type__": "cc.Quat",
|
|
||||||
"x": 0,
|
|
||||||
"y": 0,
|
|
||||||
"z": 0,
|
|
||||||
"w": 1
|
|
||||||
},
|
|
||||||
"_lscale": {
|
|
||||||
"__type__": "cc.Vec3",
|
|
||||||
"x": 1,
|
|
||||||
"y": 1,
|
|
||||||
"z": 1
|
|
||||||
},
|
|
||||||
"_mobility": 0,
|
|
||||||
"_layer": 1,
|
|
||||||
"_euler": {
|
|
||||||
"__type__": "cc.Vec3",
|
|
||||||
"x": 0,
|
|
||||||
"y": 0,
|
|
||||||
"z": 0
|
|
||||||
},
|
|
||||||
"_id": ""
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__type__": "cc.Node",
|
|
||||||
"_name": "Heart",
|
|
||||||
"_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": 0,
|
|
||||||
"z": 0
|
|
||||||
},
|
|
||||||
"_lrot": {
|
|
||||||
"__type__": "cc.Quat",
|
|
||||||
"x": 0,
|
|
||||||
"y": 0,
|
|
||||||
"z": 0,
|
|
||||||
"w": 1
|
|
||||||
},
|
|
||||||
"_lscale": {
|
|
||||||
"__type__": "cc.Vec3",
|
|
||||||
"x": 0.5,
|
|
||||||
"y": 0.5,
|
|
||||||
"z": 1
|
|
||||||
},
|
|
||||||
"_mobility": 0,
|
|
||||||
"_layer": 1,
|
|
||||||
"_euler": {
|
|
||||||
"__type__": "cc.Vec3",
|
|
||||||
"x": 0,
|
|
||||||
"y": 0,
|
|
||||||
"z": 0
|
|
||||||
},
|
|
||||||
"_id": ""
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__type__": "cc.UITransform",
|
|
||||||
"_name": "",
|
|
||||||
"_objFlags": 0,
|
|
||||||
"__editorExtras__": {},
|
|
||||||
"node": {
|
|
||||||
"__id__": 3
|
|
||||||
},
|
|
||||||
"_enabled": true,
|
|
||||||
"__prefab": {
|
|
||||||
"__id__": 5
|
|
||||||
},
|
|
||||||
"_contentSize": {
|
|
||||||
"__type__": "cc.Size",
|
|
||||||
"width": 128,
|
|
||||||
"height": 128
|
|
||||||
},
|
|
||||||
"_anchorPoint": {
|
|
||||||
"__type__": "cc.Vec2",
|
|
||||||
"x": 0.5,
|
|
||||||
"y": 0.5
|
|
||||||
},
|
|
||||||
"_id": ""
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__type__": "cc.CompPrefabInfo",
|
|
||||||
"fileId": "9dK6gOKZRNL6iMBL/bok8q"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__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": 255,
|
|
||||||
"g": 255,
|
|
||||||
"b": 255,
|
|
||||||
"a": 255
|
|
||||||
},
|
|
||||||
"_spriteFrame": {
|
|
||||||
"__uuid__": "49c583b3-d566-4c79-9e4c-bd0ca4a4b717@6ae30",
|
|
||||||
"__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": "c4wMU1ex5NfJhqLHTfbCXA"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__type__": "cc.Animation",
|
|
||||||
"_name": "",
|
|
||||||
"_objFlags": 0,
|
|
||||||
"__editorExtras__": {},
|
|
||||||
"node": {
|
|
||||||
"__id__": 3
|
|
||||||
},
|
|
||||||
"_enabled": true,
|
|
||||||
"__prefab": {
|
|
||||||
"__id__": 9
|
|
||||||
},
|
|
||||||
"playOnLoad": true,
|
|
||||||
"_clips": [
|
|
||||||
{
|
|
||||||
"__uuid__": "85cb96f6-0d73-498f-83e8-c733d2ba8634",
|
|
||||||
"__expectedType__": "cc.AnimationClip"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"_defaultClip": {
|
|
||||||
"__uuid__": "85cb96f6-0d73-498f-83e8-c733d2ba8634",
|
|
||||||
"__expectedType__": "cc.AnimationClip"
|
|
||||||
},
|
|
||||||
"_id": ""
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__type__": "cc.CompPrefabInfo",
|
|
||||||
"fileId": "a8BrgMoTRB677D2bn59nT5"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__type__": "cc.PrefabInfo",
|
|
||||||
"root": {
|
|
||||||
"__id__": 1
|
|
||||||
},
|
|
||||||
"asset": {
|
|
||||||
"__id__": 0
|
|
||||||
},
|
|
||||||
"fileId": "32+CD3KDVAR7+kLDbCcKVL",
|
|
||||||
"instance": null,
|
|
||||||
"targetOverrides": null,
|
|
||||||
"nestedPrefabInstanceRoots": null
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__type__": "cc.UITransform",
|
|
||||||
"_name": "",
|
|
||||||
"_objFlags": 0,
|
|
||||||
"__editorExtras__": {},
|
|
||||||
"node": {
|
|
||||||
"__id__": 2
|
|
||||||
},
|
|
||||||
"_enabled": true,
|
|
||||||
"__prefab": {
|
|
||||||
"__id__": 12
|
|
||||||
},
|
|
||||||
"_contentSize": {
|
|
||||||
"__type__": "cc.Size",
|
|
||||||
"width": 75,
|
|
||||||
"height": 75
|
|
||||||
},
|
|
||||||
"_anchorPoint": {
|
|
||||||
"__type__": "cc.Vec2",
|
|
||||||
"x": 0.5,
|
|
||||||
"y": 0.5
|
|
||||||
},
|
|
||||||
"_id": ""
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__type__": "cc.CompPrefabInfo",
|
|
||||||
"fileId": "e0BmTgdSdPNKfghPN3ULvl"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__type__": "cc.PrefabInfo",
|
|
||||||
"root": {
|
|
||||||
"__id__": 1
|
|
||||||
},
|
|
||||||
"asset": {
|
|
||||||
"__id__": 0
|
|
||||||
},
|
|
||||||
"fileId": "9afTUvQwVAl5yzh1A8GQ+o",
|
|
||||||
"instance": null,
|
|
||||||
"targetOverrides": null,
|
|
||||||
"nestedPrefabInstanceRoots": null
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__type__": "cc.Node",
|
|
||||||
"_name": "life",
|
|
||||||
"_objFlags": 0,
|
|
||||||
"__editorExtras__": {},
|
|
||||||
"_parent": {
|
|
||||||
"__id__": 1
|
|
||||||
},
|
|
||||||
"_children": [
|
|
||||||
{
|
|
||||||
"__id__": 15
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"_active": true,
|
|
||||||
"_components": [
|
|
||||||
{
|
|
||||||
"__id__": 23
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"_prefab": {
|
|
||||||
"__id__": 25
|
|
||||||
},
|
|
||||||
"_lpos": {
|
|
||||||
"__type__": "cc.Vec3",
|
|
||||||
"x": 0,
|
|
||||||
"y": 0,
|
|
||||||
"z": 0
|
|
||||||
},
|
|
||||||
"_lrot": {
|
|
||||||
"__type__": "cc.Quat",
|
|
||||||
"x": 0,
|
|
||||||
"y": 0,
|
|
||||||
"z": 0,
|
|
||||||
"w": 1
|
|
||||||
},
|
|
||||||
"_lscale": {
|
|
||||||
"__type__": "cc.Vec3",
|
|
||||||
"x": 1,
|
|
||||||
"y": 1,
|
|
||||||
"z": 1
|
|
||||||
},
|
|
||||||
"_mobility": 0,
|
|
||||||
"_layer": 1,
|
|
||||||
"_euler": {
|
|
||||||
"__type__": "cc.Vec3",
|
|
||||||
"x": 0,
|
|
||||||
"y": 0,
|
|
||||||
"z": 0
|
|
||||||
},
|
|
||||||
"_id": ""
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__type__": "cc.Node",
|
|
||||||
"_name": "Heart",
|
|
||||||
"_objFlags": 0,
|
|
||||||
"__editorExtras__": {},
|
|
||||||
"_parent": {
|
|
||||||
"__id__": 14
|
|
||||||
},
|
|
||||||
"_children": [],
|
|
||||||
"_active": true,
|
|
||||||
"_components": [
|
|
||||||
{
|
|
||||||
"__id__": 16
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__id__": 18
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__id__": 20
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"_prefab": {
|
|
||||||
"__id__": 22
|
|
||||||
},
|
|
||||||
"_lpos": {
|
|
||||||
"__type__": "cc.Vec3",
|
|
||||||
"x": 0,
|
|
||||||
"y": 0,
|
|
||||||
"z": 0
|
|
||||||
},
|
|
||||||
"_lrot": {
|
|
||||||
"__type__": "cc.Quat",
|
|
||||||
"x": 0,
|
|
||||||
"y": 0,
|
|
||||||
"z": 0,
|
|
||||||
"w": 1
|
|
||||||
},
|
|
||||||
"_lscale": {
|
|
||||||
"__type__": "cc.Vec3",
|
|
||||||
"x": 0.5,
|
|
||||||
"y": 0.5,
|
|
||||||
"z": 1
|
|
||||||
},
|
|
||||||
"_mobility": 0,
|
|
||||||
"_layer": 1,
|
|
||||||
"_euler": {
|
|
||||||
"__type__": "cc.Vec3",
|
|
||||||
"x": 0,
|
|
||||||
"y": 0,
|
|
||||||
"z": 0
|
|
||||||
},
|
|
||||||
"_id": ""
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__type__": "cc.UITransform",
|
|
||||||
"_name": "",
|
|
||||||
"_objFlags": 0,
|
|
||||||
"__editorExtras__": {},
|
|
||||||
"node": {
|
|
||||||
"__id__": 15
|
|
||||||
},
|
|
||||||
"_enabled": true,
|
|
||||||
"__prefab": {
|
|
||||||
"__id__": 17
|
|
||||||
},
|
|
||||||
"_contentSize": {
|
|
||||||
"__type__": "cc.Size",
|
|
||||||
"width": 128,
|
|
||||||
"height": 128
|
|
||||||
},
|
|
||||||
"_anchorPoint": {
|
|
||||||
"__type__": "cc.Vec2",
|
|
||||||
"x": 0.5,
|
|
||||||
"y": 0.5
|
|
||||||
},
|
|
||||||
"_id": ""
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__type__": "cc.CompPrefabInfo",
|
|
||||||
"fileId": "92WATqX0JCcZo06ioCsQVq"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__type__": "cc.Sprite",
|
|
||||||
"_name": "",
|
|
||||||
"_objFlags": 0,
|
|
||||||
"__editorExtras__": {},
|
|
||||||
"node": {
|
|
||||||
"__id__": 15
|
|
||||||
},
|
|
||||||
"_enabled": true,
|
|
||||||
"__prefab": {
|
|
||||||
"__id__": 19
|
|
||||||
},
|
|
||||||
"_customMaterial": null,
|
|
||||||
"_srcBlendFactor": 2,
|
|
||||||
"_dstBlendFactor": 4,
|
|
||||||
"_color": {
|
|
||||||
"__type__": "cc.Color",
|
|
||||||
"r": 255,
|
|
||||||
"g": 255,
|
|
||||||
"b": 255,
|
|
||||||
"a": 255
|
|
||||||
},
|
|
||||||
"_spriteFrame": {
|
|
||||||
"__uuid__": "49c583b3-d566-4c79-9e4c-bd0ca4a4b717@6ae30",
|
|
||||||
"__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": "41cJDsT3hOCZzGSo34uSHk"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__type__": "cc.Animation",
|
|
||||||
"_name": "",
|
|
||||||
"_objFlags": 0,
|
|
||||||
"__editorExtras__": {},
|
|
||||||
"node": {
|
|
||||||
"__id__": 15
|
|
||||||
},
|
|
||||||
"_enabled": true,
|
|
||||||
"__prefab": {
|
|
||||||
"__id__": 21
|
|
||||||
},
|
|
||||||
"playOnLoad": true,
|
|
||||||
"_clips": [
|
|
||||||
{
|
|
||||||
"__uuid__": "85cb96f6-0d73-498f-83e8-c733d2ba8634",
|
|
||||||
"__expectedType__": "cc.AnimationClip"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"_defaultClip": {
|
|
||||||
"__uuid__": "85cb96f6-0d73-498f-83e8-c733d2ba8634",
|
|
||||||
"__expectedType__": "cc.AnimationClip"
|
|
||||||
},
|
|
||||||
"_id": ""
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__type__": "cc.CompPrefabInfo",
|
|
||||||
"fileId": "d0kGhMCYtFlYN3yqSz7WeV"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__type__": "cc.PrefabInfo",
|
|
||||||
"root": {
|
|
||||||
"__id__": 1
|
|
||||||
},
|
|
||||||
"asset": {
|
|
||||||
"__id__": 0
|
|
||||||
},
|
|
||||||
"fileId": "9b7htGCG5AzITmdLu1TGHo",
|
|
||||||
"instance": null,
|
|
||||||
"targetOverrides": null,
|
|
||||||
"nestedPrefabInstanceRoots": null
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__type__": "cc.UITransform",
|
|
||||||
"_name": "",
|
|
||||||
"_objFlags": 0,
|
|
||||||
"__editorExtras__": {},
|
|
||||||
"node": {
|
|
||||||
"__id__": 14
|
|
||||||
},
|
|
||||||
"_enabled": true,
|
|
||||||
"__prefab": {
|
|
||||||
"__id__": 24
|
|
||||||
},
|
|
||||||
"_contentSize": {
|
|
||||||
"__type__": "cc.Size",
|
|
||||||
"width": 75,
|
|
||||||
"height": 75
|
|
||||||
},
|
|
||||||
"_anchorPoint": {
|
|
||||||
"__type__": "cc.Vec2",
|
|
||||||
"x": 0.5,
|
|
||||||
"y": 0.5
|
|
||||||
},
|
|
||||||
"_id": ""
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__type__": "cc.CompPrefabInfo",
|
|
||||||
"fileId": "07wKZpXKBKsZeD4uushPsB"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__type__": "cc.PrefabInfo",
|
|
||||||
"root": {
|
|
||||||
"__id__": 1
|
|
||||||
},
|
|
||||||
"asset": {
|
|
||||||
"__id__": 0
|
|
||||||
},
|
|
||||||
"fileId": "96jJCFZt5LNY39Ipt1f9ta",
|
|
||||||
"instance": null,
|
|
||||||
"targetOverrides": null,
|
|
||||||
"nestedPrefabInstanceRoots": null
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__type__": "cc.Node",
|
|
||||||
"_name": "life",
|
|
||||||
"_objFlags": 0,
|
|
||||||
"__editorExtras__": {},
|
|
||||||
"_parent": {
|
|
||||||
"__id__": 1
|
|
||||||
},
|
|
||||||
"_children": [
|
|
||||||
{
|
|
||||||
"__id__": 27
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"_active": true,
|
|
||||||
"_components": [
|
|
||||||
{
|
|
||||||
"__id__": 35
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"_prefab": {
|
|
||||||
"__id__": 37
|
|
||||||
},
|
|
||||||
"_lpos": {
|
|
||||||
"__type__": "cc.Vec3",
|
|
||||||
"x": 75,
|
|
||||||
"y": 0,
|
|
||||||
"z": 0
|
|
||||||
},
|
|
||||||
"_lrot": {
|
|
||||||
"__type__": "cc.Quat",
|
|
||||||
"x": 0,
|
|
||||||
"y": 0,
|
|
||||||
"z": 0,
|
|
||||||
"w": 1
|
|
||||||
},
|
|
||||||
"_lscale": {
|
|
||||||
"__type__": "cc.Vec3",
|
|
||||||
"x": 1,
|
|
||||||
"y": 1,
|
|
||||||
"z": 1
|
|
||||||
},
|
|
||||||
"_mobility": 0,
|
|
||||||
"_layer": 1,
|
|
||||||
"_euler": {
|
|
||||||
"__type__": "cc.Vec3",
|
|
||||||
"x": 0,
|
|
||||||
"y": 0,
|
|
||||||
"z": 0
|
|
||||||
},
|
|
||||||
"_id": ""
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__type__": "cc.Node",
|
|
||||||
"_name": "Heart",
|
|
||||||
"_objFlags": 0,
|
|
||||||
"__editorExtras__": {},
|
|
||||||
"_parent": {
|
|
||||||
"__id__": 26
|
|
||||||
},
|
|
||||||
"_children": [],
|
|
||||||
"_active": true,
|
|
||||||
"_components": [
|
|
||||||
{
|
|
||||||
"__id__": 28
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__id__": 30
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__id__": 32
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"_prefab": {
|
|
||||||
"__id__": 34
|
|
||||||
},
|
|
||||||
"_lpos": {
|
|
||||||
"__type__": "cc.Vec3",
|
|
||||||
"x": 0,
|
|
||||||
"y": 0,
|
|
||||||
"z": 0
|
|
||||||
},
|
|
||||||
"_lrot": {
|
|
||||||
"__type__": "cc.Quat",
|
|
||||||
"x": 0,
|
|
||||||
"y": 0,
|
|
||||||
"z": 0,
|
|
||||||
"w": 1
|
|
||||||
},
|
|
||||||
"_lscale": {
|
|
||||||
"__type__": "cc.Vec3",
|
|
||||||
"x": 0.5,
|
|
||||||
"y": 0.5,
|
|
||||||
"z": 1
|
|
||||||
},
|
|
||||||
"_mobility": 0,
|
|
||||||
"_layer": 1,
|
|
||||||
"_euler": {
|
|
||||||
"__type__": "cc.Vec3",
|
|
||||||
"x": 0,
|
|
||||||
"y": 0,
|
|
||||||
"z": 0
|
|
||||||
},
|
|
||||||
"_id": ""
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__type__": "cc.UITransform",
|
|
||||||
"_name": "",
|
|
||||||
"_objFlags": 0,
|
|
||||||
"__editorExtras__": {},
|
|
||||||
"node": {
|
|
||||||
"__id__": 27
|
|
||||||
},
|
|
||||||
"_enabled": true,
|
|
||||||
"__prefab": {
|
|
||||||
"__id__": 29
|
|
||||||
},
|
|
||||||
"_contentSize": {
|
|
||||||
"__type__": "cc.Size",
|
|
||||||
"width": 128,
|
|
||||||
"height": 128
|
|
||||||
},
|
|
||||||
"_anchorPoint": {
|
|
||||||
"__type__": "cc.Vec2",
|
|
||||||
"x": 0.5,
|
|
||||||
"y": 0.5
|
|
||||||
},
|
|
||||||
"_id": ""
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__type__": "cc.CompPrefabInfo",
|
|
||||||
"fileId": "acPT+GER9LR60YmYFP7MjT"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__type__": "cc.Sprite",
|
|
||||||
"_name": "",
|
|
||||||
"_objFlags": 0,
|
|
||||||
"__editorExtras__": {},
|
|
||||||
"node": {
|
|
||||||
"__id__": 27
|
|
||||||
},
|
|
||||||
"_enabled": true,
|
|
||||||
"__prefab": {
|
|
||||||
"__id__": 31
|
|
||||||
},
|
|
||||||
"_customMaterial": null,
|
|
||||||
"_srcBlendFactor": 2,
|
|
||||||
"_dstBlendFactor": 4,
|
|
||||||
"_color": {
|
|
||||||
"__type__": "cc.Color",
|
|
||||||
"r": 255,
|
|
||||||
"g": 255,
|
|
||||||
"b": 255,
|
|
||||||
"a": 255
|
|
||||||
},
|
|
||||||
"_spriteFrame": {
|
|
||||||
"__uuid__": "49c583b3-d566-4c79-9e4c-bd0ca4a4b717@6ae30",
|
|
||||||
"__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": "5eDisgrBxEK5GgW/szyv2T"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__type__": "cc.Animation",
|
|
||||||
"_name": "",
|
|
||||||
"_objFlags": 0,
|
|
||||||
"__editorExtras__": {},
|
|
||||||
"node": {
|
|
||||||
"__id__": 27
|
|
||||||
},
|
|
||||||
"_enabled": true,
|
|
||||||
"__prefab": {
|
|
||||||
"__id__": 33
|
|
||||||
},
|
|
||||||
"playOnLoad": true,
|
|
||||||
"_clips": [
|
|
||||||
{
|
|
||||||
"__uuid__": "85cb96f6-0d73-498f-83e8-c733d2ba8634",
|
|
||||||
"__expectedType__": "cc.AnimationClip"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"_defaultClip": {
|
|
||||||
"__uuid__": "85cb96f6-0d73-498f-83e8-c733d2ba8634",
|
|
||||||
"__expectedType__": "cc.AnimationClip"
|
|
||||||
},
|
|
||||||
"_id": ""
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__type__": "cc.CompPrefabInfo",
|
|
||||||
"fileId": "894dNIjr5Cbo+7b7WzuugX"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__type__": "cc.PrefabInfo",
|
|
||||||
"root": {
|
|
||||||
"__id__": 1
|
|
||||||
},
|
|
||||||
"asset": {
|
|
||||||
"__id__": 0
|
|
||||||
},
|
|
||||||
"fileId": "5fbCuofl9Oy6Ytb2A3iVdn",
|
|
||||||
"instance": null,
|
|
||||||
"targetOverrides": null,
|
|
||||||
"nestedPrefabInstanceRoots": null
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__type__": "cc.UITransform",
|
|
||||||
"_name": "",
|
|
||||||
"_objFlags": 0,
|
|
||||||
"__editorExtras__": {},
|
|
||||||
"node": {
|
|
||||||
"__id__": 26
|
|
||||||
},
|
|
||||||
"_enabled": true,
|
|
||||||
"__prefab": {
|
|
||||||
"__id__": 36
|
|
||||||
},
|
|
||||||
"_contentSize": {
|
|
||||||
"__type__": "cc.Size",
|
|
||||||
"width": 75,
|
|
||||||
"height": 75
|
|
||||||
},
|
|
||||||
"_anchorPoint": {
|
|
||||||
"__type__": "cc.Vec2",
|
|
||||||
"x": 0.5,
|
|
||||||
"y": 0.5
|
|
||||||
},
|
|
||||||
"_id": ""
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__type__": "cc.CompPrefabInfo",
|
|
||||||
"fileId": "c7Ak7m3Q9AubBMFFXDqBCi"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__type__": "cc.PrefabInfo",
|
|
||||||
"root": {
|
|
||||||
"__id__": 1
|
|
||||||
},
|
|
||||||
"asset": {
|
|
||||||
"__id__": 0
|
|
||||||
},
|
|
||||||
"fileId": "85PyEAmbNCKqO4fqnzRjrh",
|
|
||||||
"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": 225,
|
|
||||||
"height": 100
|
|
||||||
},
|
|
||||||
"_anchorPoint": {
|
|
||||||
"__type__": "cc.Vec2",
|
|
||||||
"x": 0.5,
|
|
||||||
"y": 0.5
|
|
||||||
},
|
|
||||||
"_id": ""
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__type__": "cc.CompPrefabInfo",
|
|
||||||
"fileId": "54RjRF+MFLQYwbdwzU8Mbn"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__type__": "cc.Layout",
|
|
||||||
"_name": "",
|
|
||||||
"_objFlags": 0,
|
|
||||||
"__editorExtras__": {},
|
|
||||||
"node": {
|
|
||||||
"__id__": 1
|
|
||||||
},
|
|
||||||
"_enabled": true,
|
|
||||||
"__prefab": {
|
|
||||||
"__id__": 41
|
|
||||||
},
|
|
||||||
"_resizeMode": 0,
|
|
||||||
"_layoutType": 1,
|
|
||||||
"_cellSize": {
|
|
||||||
"__type__": "cc.Size",
|
|
||||||
"width": 40,
|
|
||||||
"height": 40
|
|
||||||
},
|
|
||||||
"_startAxis": 0,
|
|
||||||
"_paddingLeft": 0,
|
|
||||||
"_paddingRight": 0,
|
|
||||||
"_paddingTop": 0,
|
|
||||||
"_paddingBottom": 0,
|
|
||||||
"_spacingX": 0,
|
|
||||||
"_spacingY": 0,
|
|
||||||
"_verticalDirection": 0,
|
|
||||||
"_horizontalDirection": 0,
|
|
||||||
"_constraint": 0,
|
|
||||||
"_constraintNum": 2,
|
|
||||||
"_affectedByScale": false,
|
|
||||||
"_isAlign": true,
|
|
||||||
"_id": ""
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__type__": "cc.CompPrefabInfo",
|
|
||||||
"fileId": "fcgjU7nDRKt7hBWpmZ6om9"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__type__": "3bb0fGlSF1MJqWSlVP4wA83",
|
|
||||||
"_name": "",
|
|
||||||
"_objFlags": 0,
|
|
||||||
"__editorExtras__": {},
|
|
||||||
"node": {
|
|
||||||
"__id__": 1
|
|
||||||
},
|
|
||||||
"_enabled": true,
|
|
||||||
"__prefab": {
|
|
||||||
"__id__": 43
|
|
||||||
},
|
|
||||||
"_id": ""
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__type__": "cc.CompPrefabInfo",
|
|
||||||
"fileId": "a7FLygadJNAqZI/552FA3l"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__type__": "cc.PrefabInfo",
|
|
||||||
"root": {
|
|
||||||
"__id__": 1
|
|
||||||
},
|
|
||||||
"asset": {
|
|
||||||
"__id__": 0
|
|
||||||
},
|
|
||||||
"fileId": "c12A1zp2JErLXNKHbk3aH/",
|
|
||||||
"targetOverrides": null
|
|
||||||
}
|
|
||||||
]
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
{
|
|
||||||
"ver": "1.1.50",
|
|
||||||
"importer": "prefab",
|
|
||||||
"imported": true,
|
|
||||||
"uuid": "2ca943f8-e891-418e-baa1-fbb597cf256a",
|
|
||||||
"files": [
|
|
||||||
".json"
|
|
||||||
],
|
|
||||||
"subMetas": {},
|
|
||||||
"userData": {
|
|
||||||
"syncNodeName": "Lifes"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -1,13 +0,0 @@
|
|||||||
{
|
|
||||||
"ver": "1.1.50",
|
|
||||||
"importer": "prefab",
|
|
||||||
"imported": true,
|
|
||||||
"uuid": "f5b71d35-1fb2-4dab-9df2-837e1dfdb8d7",
|
|
||||||
"files": [
|
|
||||||
".json"
|
|
||||||
],
|
|
||||||
"subMetas": {},
|
|
||||||
"userData": {
|
|
||||||
"syncNodeName": "equips"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
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": "d0a0b5c2-c5b8-4652-a5fb-1e91c5e9e480",
|
|
||||||
"files": [
|
|
||||||
".json"
|
|
||||||
],
|
|
||||||
"subMetas": {},
|
|
||||||
"userData": {
|
|
||||||
"syncNodeName": "herobar"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -1,13 +0,0 @@
|
|||||||
{
|
|
||||||
"ver": "1.1.50",
|
|
||||||
"importer": "prefab",
|
|
||||||
"imported": true,
|
|
||||||
"uuid": "39b11bf5-5dba-4122-8548-23c3d7c36250",
|
|
||||||
"files": [
|
|
||||||
".json"
|
|
||||||
],
|
|
||||||
"subMetas": {},
|
|
||||||
"userData": {
|
|
||||||
"syncNodeName": "heros"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,844 +0,0 @@
|
|||||||
[
|
|
||||||
{
|
|
||||||
"__type__": "cc.Prefab",
|
|
||||||
"_name": "hp",
|
|
||||||
"_objFlags": 0,
|
|
||||||
"__editorExtras__": {},
|
|
||||||
"_native": "",
|
|
||||||
"data": {
|
|
||||||
"__id__": 1
|
|
||||||
},
|
|
||||||
"optimizationPolicy": 0,
|
|
||||||
"persistent": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__type__": "cc.Node",
|
|
||||||
"_name": "hp",
|
|
||||||
"_objFlags": 0,
|
|
||||||
"__editorExtras__": {},
|
|
||||||
"_parent": null,
|
|
||||||
"_children": [
|
|
||||||
{
|
|
||||||
"__id__": 2
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__id__": 18
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__id__": 26
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"_active": true,
|
|
||||||
"_components": [
|
|
||||||
{
|
|
||||||
"__id__": 34
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__id__": 36
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"_prefab": {
|
|
||||||
"__id__": 38
|
|
||||||
},
|
|
||||||
"_lpos": {
|
|
||||||
"__type__": "cc.Vec3",
|
|
||||||
"x": 0,
|
|
||||||
"y": 35.989,
|
|
||||||
"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": "bar",
|
|
||||||
"_objFlags": 0,
|
|
||||||
"__editorExtras__": {},
|
|
||||||
"_parent": {
|
|
||||||
"__id__": 1
|
|
||||||
},
|
|
||||||
"_children": [
|
|
||||||
{
|
|
||||||
"__id__": 3
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"_active": true,
|
|
||||||
"_components": [
|
|
||||||
{
|
|
||||||
"__id__": 9
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__id__": 11
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__id__": 13
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__id__": 15
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"_prefab": {
|
|
||||||
"__id__": 17
|
|
||||||
},
|
|
||||||
"_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": "Bar",
|
|
||||||
"_objFlags": 0,
|
|
||||||
"__editorExtras__": {},
|
|
||||||
"_parent": {
|
|
||||||
"__id__": 2
|
|
||||||
},
|
|
||||||
"_children": [],
|
|
||||||
"_active": true,
|
|
||||||
"_components": [
|
|
||||||
{
|
|
||||||
"__id__": 4
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__id__": 6
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"_prefab": {
|
|
||||||
"__id__": 8
|
|
||||||
},
|
|
||||||
"_lpos": {
|
|
||||||
"__type__": "cc.Vec3",
|
|
||||||
"x": -350,
|
|
||||||
"y": 0,
|
|
||||||
"z": 0
|
|
||||||
},
|
|
||||||
"_lrot": {
|
|
||||||
"__type__": "cc.Quat",
|
|
||||||
"x": 0,
|
|
||||||
"y": 0,
|
|
||||||
"z": 0,
|
|
||||||
"w": 1
|
|
||||||
},
|
|
||||||
"_lscale": {
|
|
||||||
"__type__": "cc.Vec3",
|
|
||||||
"x": 1,
|
|
||||||
"y": 1,
|
|
||||||
"z": 1
|
|
||||||
},
|
|
||||||
"_mobility": 0,
|
|
||||||
"_layer": 33554432,
|
|
||||||
"_euler": {
|
|
||||||
"__type__": "cc.Vec3",
|
|
||||||
"x": 0,
|
|
||||||
"y": 0,
|
|
||||||
"z": 0
|
|
||||||
},
|
|
||||||
"_id": ""
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__type__": "cc.UITransform",
|
|
||||||
"_name": "",
|
|
||||||
"_objFlags": 0,
|
|
||||||
"__editorExtras__": {},
|
|
||||||
"node": {
|
|
||||||
"__id__": 3
|
|
||||||
},
|
|
||||||
"_enabled": true,
|
|
||||||
"__prefab": {
|
|
||||||
"__id__": 5
|
|
||||||
},
|
|
||||||
"_contentSize": {
|
|
||||||
"__type__": "cc.Size",
|
|
||||||
"width": 700,
|
|
||||||
"height": 90
|
|
||||||
},
|
|
||||||
"_anchorPoint": {
|
|
||||||
"__type__": "cc.Vec2",
|
|
||||||
"x": 0,
|
|
||||||
"y": 0.5
|
|
||||||
},
|
|
||||||
"_id": ""
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__type__": "cc.CompPrefabInfo",
|
|
||||||
"fileId": "5daYU66UZJPYpXIhlLSi66"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__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": 255,
|
|
||||||
"g": 255,
|
|
||||||
"b": 255,
|
|
||||||
"a": 255
|
|
||||||
},
|
|
||||||
"_spriteFrame": {
|
|
||||||
"__uuid__": "49c583b3-d566-4c79-9e4c-bd0ca4a4b717@7beff",
|
|
||||||
"__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": "5aRi4HYPdJpK6sVbV/CdB2"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__type__": "cc.PrefabInfo",
|
|
||||||
"root": {
|
|
||||||
"__id__": 1
|
|
||||||
},
|
|
||||||
"asset": {
|
|
||||||
"__id__": 0
|
|
||||||
},
|
|
||||||
"fileId": "399Qjs7B9BO5JV0p/bMm45",
|
|
||||||
"instance": null,
|
|
||||||
"targetOverrides": null,
|
|
||||||
"nestedPrefabInstanceRoots": null
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__type__": "cc.UITransform",
|
|
||||||
"_name": "",
|
|
||||||
"_objFlags": 0,
|
|
||||||
"__editorExtras__": {},
|
|
||||||
"node": {
|
|
||||||
"__id__": 2
|
|
||||||
},
|
|
||||||
"_enabled": true,
|
|
||||||
"__prefab": {
|
|
||||||
"__id__": 10
|
|
||||||
},
|
|
||||||
"_contentSize": {
|
|
||||||
"__type__": "cc.Size",
|
|
||||||
"width": 700,
|
|
||||||
"height": 90
|
|
||||||
},
|
|
||||||
"_anchorPoint": {
|
|
||||||
"__type__": "cc.Vec2",
|
|
||||||
"x": 0.5,
|
|
||||||
"y": 0.5
|
|
||||||
},
|
|
||||||
"_id": ""
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__type__": "cc.CompPrefabInfo",
|
|
||||||
"fileId": "22n7pb8txB9IEdfvYBAZNW"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__type__": "cc.Sprite",
|
|
||||||
"_name": "",
|
|
||||||
"_objFlags": 0,
|
|
||||||
"__editorExtras__": {},
|
|
||||||
"node": {
|
|
||||||
"__id__": 2
|
|
||||||
},
|
|
||||||
"_enabled": true,
|
|
||||||
"__prefab": {
|
|
||||||
"__id__": 12
|
|
||||||
},
|
|
||||||
"_customMaterial": null,
|
|
||||||
"_srcBlendFactor": 2,
|
|
||||||
"_dstBlendFactor": 4,
|
|
||||||
"_color": {
|
|
||||||
"__type__": "cc.Color",
|
|
||||||
"r": 0,
|
|
||||||
"g": 0,
|
|
||||||
"b": 0,
|
|
||||||
"a": 255
|
|
||||||
},
|
|
||||||
"_spriteFrame": {
|
|
||||||
"__uuid__": "49c583b3-d566-4c79-9e4c-bd0ca4a4b717@b84a9",
|
|
||||||
"__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": "b2hw3/0sBIH7Tr1j/mnO2o"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__type__": "cc.ProgressBar",
|
|
||||||
"_name": "",
|
|
||||||
"_objFlags": 0,
|
|
||||||
"__editorExtras__": {},
|
|
||||||
"node": {
|
|
||||||
"__id__": 2
|
|
||||||
},
|
|
||||||
"_enabled": true,
|
|
||||||
"__prefab": {
|
|
||||||
"__id__": 14
|
|
||||||
},
|
|
||||||
"_barSprite": {
|
|
||||||
"__id__": 6
|
|
||||||
},
|
|
||||||
"_mode": 0,
|
|
||||||
"_totalLength": 700,
|
|
||||||
"_progress": 1,
|
|
||||||
"_reverse": false,
|
|
||||||
"_id": ""
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__type__": "cc.CompPrefabInfo",
|
|
||||||
"fileId": "6bDpPITIVGKplsPpTnHB4V"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__type__": "2a50eqI7JZNV5Sh0y/Qd9C6",
|
|
||||||
"_name": "",
|
|
||||||
"_objFlags": 0,
|
|
||||||
"__editorExtras__": {},
|
|
||||||
"node": {
|
|
||||||
"__id__": 2
|
|
||||||
},
|
|
||||||
"_enabled": true,
|
|
||||||
"__prefab": {
|
|
||||||
"__id__": 16
|
|
||||||
},
|
|
||||||
"controller": false,
|
|
||||||
"watchPath": "",
|
|
||||||
"componentName": "",
|
|
||||||
"componentProperty": "",
|
|
||||||
"refreshRate": 0.1,
|
|
||||||
"watchPathArr": [
|
|
||||||
"data.hero.hp",
|
|
||||||
"data.hero.hp_max"
|
|
||||||
],
|
|
||||||
"stringFormat": "",
|
|
||||||
"_id": ""
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__type__": "cc.CompPrefabInfo",
|
|
||||||
"fileId": "9ft2X3kQtCCL39d2kVtuA1"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__type__": "cc.PrefabInfo",
|
|
||||||
"root": {
|
|
||||||
"__id__": 1
|
|
||||||
},
|
|
||||||
"asset": {
|
|
||||||
"__id__": 0
|
|
||||||
},
|
|
||||||
"fileId": "09WnMD6spMVK2XT+VLjMDx",
|
|
||||||
"instance": null,
|
|
||||||
"targetOverrides": null,
|
|
||||||
"nestedPrefabInstanceRoots": null
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__type__": "cc.Node",
|
|
||||||
"_name": "Slider_Play_02_Border",
|
|
||||||
"_objFlags": 0,
|
|
||||||
"__editorExtras__": {},
|
|
||||||
"_parent": {
|
|
||||||
"__id__": 1
|
|
||||||
},
|
|
||||||
"_children": [],
|
|
||||||
"_active": true,
|
|
||||||
"_components": [
|
|
||||||
{
|
|
||||||
"__id__": 19
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__id__": 21
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__id__": 23
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"_prefab": {
|
|
||||||
"__id__": 25
|
|
||||||
},
|
|
||||||
"_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__": 18
|
|
||||||
},
|
|
||||||
"_enabled": true,
|
|
||||||
"__prefab": {
|
|
||||||
"__id__": 20
|
|
||||||
},
|
|
||||||
"_contentSize": {
|
|
||||||
"__type__": "cc.Size",
|
|
||||||
"width": 720,
|
|
||||||
"height": 120
|
|
||||||
},
|
|
||||||
"_anchorPoint": {
|
|
||||||
"__type__": "cc.Vec2",
|
|
||||||
"x": 0.5,
|
|
||||||
"y": 0.5
|
|
||||||
},
|
|
||||||
"_id": ""
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__type__": "cc.CompPrefabInfo",
|
|
||||||
"fileId": "10KSkdyExNYoIbGk4wKnrO"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__type__": "cc.Sprite",
|
|
||||||
"_name": "",
|
|
||||||
"_objFlags": 0,
|
|
||||||
"__editorExtras__": {},
|
|
||||||
"node": {
|
|
||||||
"__id__": 18
|
|
||||||
},
|
|
||||||
"_enabled": true,
|
|
||||||
"__prefab": {
|
|
||||||
"__id__": 22
|
|
||||||
},
|
|
||||||
"_customMaterial": null,
|
|
||||||
"_srcBlendFactor": 2,
|
|
||||||
"_dstBlendFactor": 4,
|
|
||||||
"_color": {
|
|
||||||
"__type__": "cc.Color",
|
|
||||||
"r": 255,
|
|
||||||
"g": 255,
|
|
||||||
"b": 255,
|
|
||||||
"a": 255
|
|
||||||
},
|
|
||||||
"_spriteFrame": {
|
|
||||||
"__uuid__": "49c583b3-d566-4c79-9e4c-bd0ca4a4b717@87ffc",
|
|
||||||
"__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": "baANvY7y5Cer/QI8QVxU7V"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__type__": "cc.Widget",
|
|
||||||
"_name": "",
|
|
||||||
"_objFlags": 0,
|
|
||||||
"__editorExtras__": {},
|
|
||||||
"node": {
|
|
||||||
"__id__": 18
|
|
||||||
},
|
|
||||||
"_enabled": true,
|
|
||||||
"__prefab": {
|
|
||||||
"__id__": 24
|
|
||||||
},
|
|
||||||
"_alignFlags": 40,
|
|
||||||
"_target": null,
|
|
||||||
"_left": 0,
|
|
||||||
"_right": 0,
|
|
||||||
"_top": 0,
|
|
||||||
"_bottom": 0,
|
|
||||||
"_horizontalCenter": 0,
|
|
||||||
"_verticalCenter": 0,
|
|
||||||
"_isAbsLeft": true,
|
|
||||||
"_isAbsRight": true,
|
|
||||||
"_isAbsTop": true,
|
|
||||||
"_isAbsBottom": true,
|
|
||||||
"_isAbsHorizontalCenter": true,
|
|
||||||
"_isAbsVerticalCenter": true,
|
|
||||||
"_originalWidth": 87,
|
|
||||||
"_originalHeight": 0,
|
|
||||||
"_alignMode": 2,
|
|
||||||
"_lockFlags": 0,
|
|
||||||
"_id": ""
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__type__": "cc.CompPrefabInfo",
|
|
||||||
"fileId": "0azo/i85BP1rcuJZJLanm4"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__type__": "cc.PrefabInfo",
|
|
||||||
"root": {
|
|
||||||
"__id__": 1
|
|
||||||
},
|
|
||||||
"asset": {
|
|
||||||
"__id__": 0
|
|
||||||
},
|
|
||||||
"fileId": "26klZKPWVJWp/843VbhKOn",
|
|
||||||
"instance": null,
|
|
||||||
"targetOverrides": null,
|
|
||||||
"nestedPrefabInstanceRoots": null
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__type__": "cc.Node",
|
|
||||||
"_name": "Label",
|
|
||||||
"_objFlags": 0,
|
|
||||||
"__editorExtras__": {},
|
|
||||||
"_parent": {
|
|
||||||
"__id__": 1
|
|
||||||
},
|
|
||||||
"_children": [],
|
|
||||||
"_active": true,
|
|
||||||
"_components": [
|
|
||||||
{
|
|
||||||
"__id__": 27
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__id__": 29
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__id__": 31
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"_prefab": {
|
|
||||||
"__id__": 33
|
|
||||||
},
|
|
||||||
"_lpos": {
|
|
||||||
"__type__": "cc.Vec3",
|
|
||||||
"x": 0,
|
|
||||||
"y": -13.68,
|
|
||||||
"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__": 26
|
|
||||||
},
|
|
||||||
"_enabled": true,
|
|
||||||
"__prefab": {
|
|
||||||
"__id__": 28
|
|
||||||
},
|
|
||||||
"_contentSize": {
|
|
||||||
"__type__": "cc.Size",
|
|
||||||
"width": 224.1953125,
|
|
||||||
"height": 54.4
|
|
||||||
},
|
|
||||||
"_anchorPoint": {
|
|
||||||
"__type__": "cc.Vec2",
|
|
||||||
"x": 0.5,
|
|
||||||
"y": 0.5
|
|
||||||
},
|
|
||||||
"_id": ""
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__type__": "cc.CompPrefabInfo",
|
|
||||||
"fileId": "3fBTWi4BlAHIj2VX7G27Zp"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__type__": "cc.Label",
|
|
||||||
"_name": "",
|
|
||||||
"_objFlags": 0,
|
|
||||||
"__editorExtras__": {},
|
|
||||||
"node": {
|
|
||||||
"__id__": 26
|
|
||||||
},
|
|
||||||
"_enabled": true,
|
|
||||||
"__prefab": {
|
|
||||||
"__id__": 30
|
|
||||||
},
|
|
||||||
"_customMaterial": null,
|
|
||||||
"_srcBlendFactor": 2,
|
|
||||||
"_dstBlendFactor": 4,
|
|
||||||
"_color": {
|
|
||||||
"__type__": "cc.Color",
|
|
||||||
"r": 255,
|
|
||||||
"g": 255,
|
|
||||||
"b": 255,
|
|
||||||
"a": 255
|
|
||||||
},
|
|
||||||
"_string": "生命值:{{0}}/{{1}}",
|
|
||||||
"_horizontalAlign": 1,
|
|
||||||
"_verticalAlign": 1,
|
|
||||||
"_actualFontSize": 30,
|
|
||||||
"_fontSize": 30,
|
|
||||||
"_fontFamily": "Arial",
|
|
||||||
"_lineHeight": 40,
|
|
||||||
"_overflow": 0,
|
|
||||||
"_enableWrapText": true,
|
|
||||||
"_font": null,
|
|
||||||
"_isSystemFontUsed": true,
|
|
||||||
"_spacingX": 0,
|
|
||||||
"_isItalic": false,
|
|
||||||
"_isBold": false,
|
|
||||||
"_isUnderline": false,
|
|
||||||
"_underlineHeight": 2,
|
|
||||||
"_cacheMode": 0,
|
|
||||||
"_enableOutline": true,
|
|
||||||
"_outlineColor": {
|
|
||||||
"__type__": "cc.Color",
|
|
||||||
"r": 0,
|
|
||||||
"g": 0,
|
|
||||||
"b": 0,
|
|
||||||
"a": 255
|
|
||||||
},
|
|
||||||
"_outlineWidth": 2,
|
|
||||||
"_enableShadow": false,
|
|
||||||
"_shadowColor": {
|
|
||||||
"__type__": "cc.Color",
|
|
||||||
"r": 0,
|
|
||||||
"g": 0,
|
|
||||||
"b": 0,
|
|
||||||
"a": 255
|
|
||||||
},
|
|
||||||
"_shadowOffset": {
|
|
||||||
"__type__": "cc.Vec2",
|
|
||||||
"x": 2,
|
|
||||||
"y": 2
|
|
||||||
},
|
|
||||||
"_shadowBlur": 2,
|
|
||||||
"_id": ""
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__type__": "cc.CompPrefabInfo",
|
|
||||||
"fileId": "cbIBSBhmxC1rq8aYJ3OEYY"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__type__": "545c05XsG9GDJispEGWKvYv",
|
|
||||||
"_name": "",
|
|
||||||
"_objFlags": 0,
|
|
||||||
"__editorExtras__": {},
|
|
||||||
"node": {
|
|
||||||
"__id__": 26
|
|
||||||
},
|
|
||||||
"_enabled": true,
|
|
||||||
"__prefab": {
|
|
||||||
"__id__": 32
|
|
||||||
},
|
|
||||||
"templateMode": true,
|
|
||||||
"watchPath": "",
|
|
||||||
"labelType": "cc.Label",
|
|
||||||
"watchPathArr": [
|
|
||||||
"data.hero.hp",
|
|
||||||
"data.hero.hp_max"
|
|
||||||
],
|
|
||||||
"_id": ""
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__type__": "cc.CompPrefabInfo",
|
|
||||||
"fileId": "42PxpBkIdA969vpsU5zbIQ"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__type__": "cc.PrefabInfo",
|
|
||||||
"root": {
|
|
||||||
"__id__": 1
|
|
||||||
},
|
|
||||||
"asset": {
|
|
||||||
"__id__": 0
|
|
||||||
},
|
|
||||||
"fileId": "a0Dl7ZXlNDP4F4OZKKsEi1",
|
|
||||||
"instance": null,
|
|
||||||
"targetOverrides": null,
|
|
||||||
"nestedPrefabInstanceRoots": null
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__type__": "cc.UITransform",
|
|
||||||
"_name": "",
|
|
||||||
"_objFlags": 0,
|
|
||||||
"__editorExtras__": {},
|
|
||||||
"node": {
|
|
||||||
"__id__": 1
|
|
||||||
},
|
|
||||||
"_enabled": true,
|
|
||||||
"__prefab": {
|
|
||||||
"__id__": 35
|
|
||||||
},
|
|
||||||
"_contentSize": {
|
|
||||||
"__type__": "cc.Size",
|
|
||||||
"width": 720,
|
|
||||||
"height": 60
|
|
||||||
},
|
|
||||||
"_anchorPoint": {
|
|
||||||
"__type__": "cc.Vec2",
|
|
||||||
"x": 0.5,
|
|
||||||
"y": 0.5
|
|
||||||
},
|
|
||||||
"_id": ""
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__type__": "cc.CompPrefabInfo",
|
|
||||||
"fileId": "cfl+ga0sJJe5TKn+w4crJn"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__type__": "cc.Widget",
|
|
||||||
"_name": "",
|
|
||||||
"_objFlags": 0,
|
|
||||||
"__editorExtras__": {},
|
|
||||||
"node": {
|
|
||||||
"__id__": 1
|
|
||||||
},
|
|
||||||
"_enabled": true,
|
|
||||||
"__prefab": {
|
|
||||||
"__id__": 37
|
|
||||||
},
|
|
||||||
"_alignFlags": 40,
|
|
||||||
"_target": null,
|
|
||||||
"_left": 0,
|
|
||||||
"_right": 0,
|
|
||||||
"_top": 0,
|
|
||||||
"_bottom": 0,
|
|
||||||
"_horizontalCenter": 0,
|
|
||||||
"_verticalCenter": 0,
|
|
||||||
"_isAbsLeft": true,
|
|
||||||
"_isAbsRight": true,
|
|
||||||
"_isAbsTop": true,
|
|
||||||
"_isAbsBottom": true,
|
|
||||||
"_isAbsHorizontalCenter": true,
|
|
||||||
"_isAbsVerticalCenter": true,
|
|
||||||
"_originalWidth": 300,
|
|
||||||
"_originalHeight": 0,
|
|
||||||
"_alignMode": 2,
|
|
||||||
"_lockFlags": 0,
|
|
||||||
"_id": ""
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__type__": "cc.CompPrefabInfo",
|
|
||||||
"fileId": "28MDKub9ND4qj10qwNKuvy"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"__type__": "cc.PrefabInfo",
|
|
||||||
"root": {
|
|
||||||
"__id__": 1
|
|
||||||
},
|
|
||||||
"asset": {
|
|
||||||
"__id__": 0
|
|
||||||
},
|
|
||||||
"fileId": "1aCwIjQl5Fn5HIyCM+uIRH",
|
|
||||||
"targetOverrides": null
|
|
||||||
}
|
|
||||||
]
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
{
|
|
||||||
"ver": "1.1.50",
|
|
||||||
"importer": "prefab",
|
|
||||||
"imported": true,
|
|
||||||
"uuid": "72560516-980d-4815-99f8-5e7f0051c09b",
|
|
||||||
"files": [
|
|
||||||
".json"
|
|
||||||
],
|
|
||||||
"subMetas": {},
|
|
||||||
"userData": {
|
|
||||||
"syncNodeName": "hp"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -1,3 +1,15 @@
|
|||||||
|
RED1: "57262A",
|
||||||
|
RED2: "A92E43",
|
||||||
|
BLUE1: "3D568D",
|
||||||
|
BLUE2: "3D75B3",
|
||||||
|
YELLOW: "DD9304" ,
|
||||||
|
YELLOW2: "EBB62D" ,
|
||||||
|
GREEN1: "1F5949",
|
||||||
|
GREEN2: "00A373",
|
||||||
|
PURPLE1: "7251A6",
|
||||||
|
PURPLE2: "906CCE",
|
||||||
|
|
||||||
|
|
||||||
# 游戏总设计
|
# 游戏总设计
|
||||||
## 游戏模式(已确定)
|
## 游戏模式(已确定)
|
||||||
玩家角色固定在左边位置,不可移动,怪物从右边进入,玩家主英雄死亡后,游戏失败,干掉 4个boss后胜利(胜利条件还在设计中),boss随机,怪物随机,通过达成一定条件完成事件,获得特定分值,不管输赢,计算最终分值 并排名
|
玩家角色固定在左边位置,不可移动,怪物从右边进入,玩家主英雄死亡后,游戏失败,干掉 4个boss后胜利(胜利条件还在设计中),boss随机,怪物随机,通过达成一定条件完成事件,获得特定分值,不管输赢,计算最终分值 并排名
|
||||||
|
|||||||
@@ -58,15 +58,3 @@ export enum FacSet {
|
|||||||
HERO=0,
|
HERO=0,
|
||||||
MON=1,
|
MON=1,
|
||||||
}
|
}
|
||||||
export const ColorSet: { [key: string]: string } = {
|
|
||||||
RED1: "57262A",
|
|
||||||
RED2: "A92E43",
|
|
||||||
BLUE1: "3D568D",
|
|
||||||
BLUE2: "3D75B3",
|
|
||||||
YELLOW: "DD9304" ,
|
|
||||||
YELLOW2: "EBB62D" ,
|
|
||||||
GREEN1: "1F5949",
|
|
||||||
GREEN2: "00A373",
|
|
||||||
PURPLE1: "7251A6",
|
|
||||||
PURPLE2: "906CCE",
|
|
||||||
};
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 角色属性数据
|
|
||||||
*/
|
|
||||||
@ecs.register('BossModel')
|
|
||||||
export class BossModelComp extends ecs.Comp {
|
|
||||||
|
|
||||||
reset() {
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
{"ver":"4.0.23","importer":"typescript","imported":true,"uuid":"fa6157bf-a254-44af-a0c0-5d16f12cd761","files":[],"subMetas":{},"userData":{}}
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
|
|
||||||
import { VM } from "../../../../extensions/oops-plugin-framework/assets/libs/model-view/ViewModel";
|
|
||||||
|
|
||||||
/** 数据层对象 */
|
|
||||||
@ecs.register('FriendModel')
|
|
||||||
export class FriendModelComp extends ecs.Comp {
|
|
||||||
/** 提供 MVVM 组件使用的数据 */
|
|
||||||
private vm: any = {};
|
|
||||||
|
|
||||||
/** 显示数据添加到 MVVM 框架中监视 */
|
|
||||||
vmAdd() {
|
|
||||||
VM.add(this.vm, "FriendModel");
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 显示数据从 MVVM 框架中移除 */
|
|
||||||
vmRemove() {
|
|
||||||
VM.remove("FriendModel");
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 数据层组件移除时,重置所有数据为默认值 */
|
|
||||||
reset() {
|
|
||||||
for (var key in this.vm) {
|
|
||||||
delete this.vm[key];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
{
|
|
||||||
"ver": "4.0.23",
|
|
||||||
"importer": "typescript",
|
|
||||||
"imported": true,
|
|
||||||
"uuid": "bffcbaf3-0abd-46c9-b297-da0667e9b7f3",
|
|
||||||
"files": [],
|
|
||||||
"subMetas": {},
|
|
||||||
"userData": {}
|
|
||||||
}
|
|
||||||
@@ -1,44 +0,0 @@
|
|||||||
import { _decorator, Color, Component, Label, Node, resources, Sprite, SpriteAtlas } from 'cc';
|
|
||||||
import { HeroInfo } from '../common/config/heroSet';
|
|
||||||
import { oops } from '../../../../extensions/oops-plugin-framework/assets/core/Oops';
|
|
||||||
import { UIID } from '../common/config/GameUIConfig';
|
|
||||||
import { Items } from '../common/config/Items';
|
|
||||||
import { ColorSet } from '../common/config/BoxSet';
|
|
||||||
const { ccclass, property } = _decorator;
|
|
||||||
|
|
||||||
@ccclass('HChipComp')
|
|
||||||
export class HChipComp extends Component {
|
|
||||||
h_uuid:number=0
|
|
||||||
num:number=0
|
|
||||||
lv:number=0
|
|
||||||
start() {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
update(deltaTime: number) {
|
|
||||||
|
|
||||||
}
|
|
||||||
show_info(){
|
|
||||||
if(this.node.parent.name=="item_info") return
|
|
||||||
oops.gui.open(UIID.ItemInfo, {uuid:this.h_uuid,type:2});
|
|
||||||
}
|
|
||||||
|
|
||||||
update_data(uuid:number,num:number=0){
|
|
||||||
this.h_uuid = uuid;
|
|
||||||
var icon_path = "game/heros/herois"
|
|
||||||
resources.load(icon_path, SpriteAtlas, (err: any, atlas) => {
|
|
||||||
const sprite = this.node.getChildByName("hero").getChildByName("icon").getComponent(Sprite);
|
|
||||||
sprite.spriteFrame = atlas.getSpriteFrame(HeroInfo[uuid].path);
|
|
||||||
});
|
|
||||||
if(num > 1){
|
|
||||||
this.node.getChildByName("num").getComponent(Label).string = num.toString();
|
|
||||||
}else{
|
|
||||||
this.node.getChildByName("num").getComponent(Label).string = "";
|
|
||||||
}
|
|
||||||
this.node.getChildByName("g1").active=HeroInfo[uuid].quality==1
|
|
||||||
this.node.getChildByName("g2").active=HeroInfo[uuid].quality==2
|
|
||||||
this.node.getChildByName("g3").active=HeroInfo[uuid].quality==3
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@@ -7,8 +7,6 @@ import { HeroViewComp } from "./HeroViewComp";
|
|||||||
import { BoxSet, FacSet } from "../common/config/BoxSet";
|
import { BoxSet, FacSet } from "../common/config/BoxSet";
|
||||||
import { HeroInfo, HeroPos, HType } from "../common/config/heroSet";
|
import { HeroInfo, HeroPos, HType } from "../common/config/heroSet";
|
||||||
import { BattleMoveComp } from "../common/ecs/position/BattleMoveComp";
|
import { BattleMoveComp } from "../common/ecs/position/BattleMoveComp";
|
||||||
import { FriendModelComp } from "./FriendModel";
|
|
||||||
import { MasterModelComp } from "./MasterModel";
|
|
||||||
import { GameEvent } from "../common/config/GameEvent";
|
import { GameEvent } from "../common/config/GameEvent";
|
||||||
import { BuffAttr, getBuffNum, SkillSet } from "../common/config/SkillSet";
|
import { BuffAttr, getBuffNum, SkillSet } from "../common/config/SkillSet";
|
||||||
import { FightSet } from "../common/config/Mission";
|
import { FightSet } from "../common/config/Mission";
|
||||||
@@ -30,12 +28,8 @@ export class Hero extends ecs.Entity {
|
|||||||
destroy(): void {
|
destroy(): void {
|
||||||
this.remove(HeroViewComp);
|
this.remove(HeroViewComp);
|
||||||
this.remove(HeroModelComp);
|
this.remove(HeroModelComp);
|
||||||
if(this.get(FriendModelComp)){
|
|
||||||
this.remove(FriendModelComp);
|
|
||||||
}
|
|
||||||
if(this.get(MasterModelComp)){
|
|
||||||
this.remove(MasterModelComp);
|
|
||||||
}
|
|
||||||
super.destroy();
|
super.destroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -56,7 +50,6 @@ export class Hero extends ecs.Entity {
|
|||||||
// console.log("hero load",pos)
|
// console.log("hero load",pos)
|
||||||
var hv = this.hero_init(uuid,node,info)
|
var hv = this.hero_init(uuid,node,info)
|
||||||
this.add(hv);
|
this.add(hv);
|
||||||
this.addComponents<ecs.Comp>(MasterModelComp)
|
|
||||||
oops.message.dispatchEvent(GameEvent.MasterCalled,{uuid:uuid})
|
oops.message.dispatchEvent(GameEvent.MasterCalled,{uuid:uuid})
|
||||||
const move = this.get(BattleMoveComp);
|
const move = this.get(BattleMoveComp);
|
||||||
move.direction = 1; // 向右移动
|
move.direction = 1; // 向右移动
|
||||||
|
|||||||
@@ -1,26 +0,0 @@
|
|||||||
import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
|
|
||||||
import { VM } from "../../../../extensions/oops-plugin-framework/assets/libs/model-view/ViewModel";
|
|
||||||
|
|
||||||
/** 数据层对象 */
|
|
||||||
@ecs.register('MasterModel')
|
|
||||||
export class MasterModelComp extends ecs.Comp {
|
|
||||||
/** 提供 MVVM 组件使用的数据 */
|
|
||||||
private vm: any = {};
|
|
||||||
|
|
||||||
/** 显示数据添加到 MVVM 框架中监视 */
|
|
||||||
vmAdd() {
|
|
||||||
VM.add(this.vm, "MasterModel");
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 显示数据从 MVVM 框架中移除 */
|
|
||||||
vmRemove() {
|
|
||||||
VM.remove("MasterModel");
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 数据层组件移除时,重置所有数据为默认值 */
|
|
||||||
reset() {
|
|
||||||
for (var key in this.vm) {
|
|
||||||
delete this.vm[key];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
{
|
|
||||||
"ver": "4.0.23",
|
|
||||||
"importer": "typescript",
|
|
||||||
"imported": true,
|
|
||||||
"uuid": "8b5cf0cb-bab1-4084-bfe5-21fc74914b2f",
|
|
||||||
"files": [],
|
|
||||||
"subMetas": {},
|
|
||||||
"userData": {}
|
|
||||||
}
|
|
||||||
@@ -1,45 +0,0 @@
|
|||||||
import { _decorator, Component, Label, Node, resources, Sprite, SpriteAtlas } from 'cc';
|
|
||||||
import { SkillSet } from '../common/config/SkillSet';
|
|
||||||
import { oops } from '../../../../extensions/oops-plugin-framework/assets/core/Oops';
|
|
||||||
import { UIID } from '../common/config/GameUIConfig';
|
|
||||||
import { Items } from '../common/config/Items';
|
|
||||||
const { ccclass, property } = _decorator;
|
|
||||||
|
|
||||||
@ccclass('SChipComp')
|
|
||||||
export class SChipComp extends Component {
|
|
||||||
h_uuid:number=0
|
|
||||||
num:number=0
|
|
||||||
lv:number=0
|
|
||||||
start() {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
update(deltaTime: number) {
|
|
||||||
|
|
||||||
}
|
|
||||||
show_info(){
|
|
||||||
if(this.node.parent.name=="reward") return
|
|
||||||
oops.gui.open(UIID.ItemInfo, {uuid:this.h_uuid,type:1});
|
|
||||||
}
|
|
||||||
|
|
||||||
update_data(uuid:number,num:number=0){
|
|
||||||
this.h_uuid = uuid;
|
|
||||||
if(num > 0){
|
|
||||||
this.node.getChildByName("num").getComponent(Label).string = num.toString();
|
|
||||||
}else{
|
|
||||||
this.node.getChildByName("num").getComponent(Label).string = "";
|
|
||||||
}
|
|
||||||
|
|
||||||
if(uuid == 0){ return;}
|
|
||||||
var icon_path = "game/heros/cards"
|
|
||||||
// console.log("update_data",SkillSet[uuid].path)
|
|
||||||
resources.load(icon_path, SpriteAtlas, (err: any, atlas) => {
|
|
||||||
const sprite = this.node.getChildByName("skill").getChildByName("icon").getComponent(Sprite);
|
|
||||||
// console.log("update_data",atlas,sprite)
|
|
||||||
sprite.spriteFrame = atlas.getSpriteFrame(SkillSet[uuid].path);
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
{"ver":"4.0.23","importer":"typescript","imported":true,"uuid":"f653e13a-d17c-4f62-808a-1e95a4df5327","files":[],"subMetas":{},"userData":{}}
|
|
||||||
@@ -11,7 +11,6 @@ import { CCComp } from 'db://oops-framework/module/common/CCComp';
|
|||||||
import { MonModelComp } from './MonModelComp';
|
import { MonModelComp } from './MonModelComp';
|
||||||
import { HeroModelComp } from './HeroModelComp';
|
import { HeroModelComp } from './HeroModelComp';
|
||||||
import { FightSet } from '../common/config/Mission';
|
import { FightSet } from '../common/config/Mission';
|
||||||
import { MasterModelComp } from './MasterModel';
|
|
||||||
const { ccclass, property } = _decorator;
|
const { ccclass, property } = _decorator;
|
||||||
|
|
||||||
@ccclass('SkillCon')
|
@ccclass('SkillCon')
|
||||||
@@ -21,24 +20,13 @@ export class SkillConComp extends CCComp {
|
|||||||
HeroEntity:any=null;
|
HeroEntity:any=null;
|
||||||
skill_cd=0
|
skill_cd=0
|
||||||
private _timers: { [key: string]: number } = {};
|
private _timers: { [key: string]: number } = {};
|
||||||
private _damageQueue: Array<{ timer: number; callback: () => void }> = [];
|
|
||||||
|
|
||||||
aoe_queues:any[]=[] // 范围伤害技能执行队列
|
|
||||||
private aoe_timers: Map<number, number> = new Map(); // 每个技能的独立计时器
|
|
||||||
private readonly AOE_INTERVAL: number = 0.4; // 执行间隔,单位秒
|
|
||||||
private skill_id_counter: number = 0; // 技能ID计数器
|
|
||||||
aoe_target_pos:Vec3=new Vec3(180,40,0)
|
|
||||||
|
|
||||||
|
|
||||||
init(): void {
|
init(): void {
|
||||||
this.on(GameEvent.FightEnd, this.clear_timer, this);
|
this.on(GameEvent.FightEnd, this.clear_timer, this);
|
||||||
|
|
||||||
}
|
}
|
||||||
onLoad(){
|
onLoad(){
|
||||||
this.HeroView=this.node.getComponent(HeroViewComp)
|
this.HeroView=this.node.getComponent(HeroViewComp)
|
||||||
// //console.log(this.HeroView.uid+"=>"+this.HeroView.hero_name+"=> SkillConComp onLoad")
|
// //console.log(this.HeroView.uid+"=>"+this.HeroView.hero_name+"=> SkillConComp onLoad")
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
start() {
|
start() {
|
||||||
// //console.log(this.HeroView.uuid+"=>"+this.HeroView.hero_name+"=> SkillConComp start")
|
// //console.log(this.HeroView.uuid+"=>"+this.HeroView.hero_name+"=> SkillConComp start")
|
||||||
@@ -60,34 +48,6 @@ export class SkillConComp extends CCComp {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.aoe_queues.length > 0) {
|
|
||||||
//console.log("[FightConComp]:aoe_queues:",this.aoe_queues)
|
|
||||||
|
|
||||||
// 遍历所有必杀技技能,更新它们的计时器
|
|
||||||
for (let i = this.aoe_queues.length - 1; i >= 0; i--) {
|
|
||||||
let skill = this.aoe_queues[i];
|
|
||||||
let timer = this.aoe_timers.get(skill.id) || 0;
|
|
||||||
|
|
||||||
timer += dt;
|
|
||||||
this.aoe_timers.set(skill.id, timer);
|
|
||||||
|
|
||||||
// 检查是否到达执行间隔
|
|
||||||
if (timer >= this.AOE_INTERVAL) {
|
|
||||||
// 重置计时器
|
|
||||||
this.aoe_timers.set(skill.id, 0);
|
|
||||||
|
|
||||||
// 执行技能
|
|
||||||
this.aoe_skill_execute(skill);
|
|
||||||
skill.count--;
|
|
||||||
|
|
||||||
// 如果技能执行完毕,从队列中移除
|
|
||||||
if (skill.count <= 0) {
|
|
||||||
this.aoe_queues.splice(i, 1);
|
|
||||||
this.aoe_timers.delete(skill.id);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -211,42 +171,7 @@ export class SkillConComp extends CCComp {
|
|||||||
return pos
|
return pos
|
||||||
}
|
}
|
||||||
|
|
||||||
private aoe_skill_execute(data:any){
|
|
||||||
let skill=ecs.getEntity<Skill>(Skill)
|
|
||||||
let master = ecs.query(ecs.allOf(MasterModelComp))
|
|
||||||
|
|
||||||
// 检查必要参数
|
|
||||||
if (!master || master.length === 0) {
|
|
||||||
console.error("[FightConComp] 未找到主角实体");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
let masterView = master[0].get(HeroViewComp);
|
|
||||||
if (!masterView) {
|
|
||||||
console.error("[FightConComp] 主角视图组件获取失败");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
let angle=0
|
|
||||||
let targets = this.pickRandomTarget(data.count)
|
|
||||||
let target_pos= new Vec3(0,0,0)
|
|
||||||
if(targets.length==0){
|
|
||||||
target_pos=this.aoe_target_pos
|
|
||||||
}else{
|
|
||||||
target_pos= new Vec3(targets[0].get(HeroViewComp).node.position.x,0,0)
|
|
||||||
}
|
|
||||||
let start_pos=new Vec3(-280,50,0)
|
|
||||||
// //console.log("[Skill]:node=>",start_pos)
|
|
||||||
skill.load(
|
|
||||||
start_pos,
|
|
||||||
this.node.parent,
|
|
||||||
data.s_uuid,
|
|
||||||
target_pos,
|
|
||||||
masterView,
|
|
||||||
angle,
|
|
||||||
data.damage
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 随机选择目标 */
|
/** 随机选择目标 */
|
||||||
private pickRandomTarget(count: number): ecs.Entity[] {
|
private pickRandomTarget(count: number): ecs.Entity[] {
|
||||||
@@ -276,9 +201,6 @@ export class SkillConComp extends CCComp {
|
|||||||
|
|
||||||
reset() {
|
reset() {
|
||||||
this.clear_timer();
|
this.clear_timer();
|
||||||
this.aoe_queues = [] // 清空技能队列
|
|
||||||
this.aoe_timers = new Map(); // 重置计时器
|
|
||||||
this.skill_id_counter = 0; // 重置技能ID计数器
|
|
||||||
}
|
}
|
||||||
|
|
||||||
onDestroy() {
|
onDestroy() {
|
||||||
|
|||||||
@@ -1,19 +0,0 @@
|
|||||||
import { _decorator, Component, Node, sp } from 'cc';
|
|
||||||
const { ccclass, property } = _decorator;
|
|
||||||
|
|
||||||
@ccclass('UiHeroComp')
|
|
||||||
export class UiHeroComp extends Component {
|
|
||||||
h_uuid:number=0
|
|
||||||
start() {
|
|
||||||
var spine = this.node.getChildByName("anm").getComponent('sp.Skeleton') as sp.Skeleton;
|
|
||||||
spine.setAnimation(0, 'Idle', true);
|
|
||||||
}
|
|
||||||
to_destroy(){
|
|
||||||
this.node.destroy()
|
|
||||||
}
|
|
||||||
update(deltaTime: number) {
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
{
|
|
||||||
"ver": "4.0.23",
|
|
||||||
"importer": "typescript",
|
|
||||||
"imported": true,
|
|
||||||
"uuid": "44ef2827-b6e4-45fd-b3c2-9f8562884b81",
|
|
||||||
"files": [],
|
|
||||||
"subMetas": {},
|
|
||||||
"userData": {}
|
|
||||||
}
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
import { _decorator, Component, Node, sp } from 'cc';
|
|
||||||
const { ccclass, property } = _decorator;
|
|
||||||
|
|
||||||
@ccclass('idleComp')
|
|
||||||
export class idleComp extends Component {
|
|
||||||
start() {
|
|
||||||
var spine = this.node.getChildByName("anm").getComponent('sp.Skeleton') as sp.Skeleton;
|
|
||||||
spine.setAnimation(0, 'Idle', true);
|
|
||||||
}
|
|
||||||
|
|
||||||
update(deltaTime: number) {
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
{
|
|
||||||
"ver": "4.0.23",
|
|
||||||
"importer": "typescript",
|
|
||||||
"imported": true,
|
|
||||||
"uuid": "3fc03a0b-a210-4f3e-8f82-e98a4c1d9b34",
|
|
||||||
"files": [],
|
|
||||||
"subMetas": {},
|
|
||||||
"userData": {}
|
|
||||||
}
|
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
import { _decorator } from "cc";
|
|
||||||
import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
|
|
||||||
import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/module/common/CCComp";
|
|
||||||
|
|
||||||
const { ccclass, property } = _decorator;
|
|
||||||
|
|
||||||
/** 视图层对象 */
|
|
||||||
@ccclass('BarBossCompComp')
|
|
||||||
@ecs.register('BarBossComp', false)
|
|
||||||
export class BarBossCompComp extends CCComp {
|
|
||||||
/** 视图层逻辑代码分离演示 */
|
|
||||||
start() {
|
|
||||||
// var entity = this.ent as ecs.Entity; // ecs.Entity 可转为当前模块的具体实体对象
|
|
||||||
// this.on(ModuleEvent.Cmd, this.onHandler, this);
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 全局消息逻辑处理 */
|
|
||||||
// private onHandler(event: string, args: any) {
|
|
||||||
// switch (event) {
|
|
||||||
// case ModuleEvent.Cmd:
|
|
||||||
// break;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
/** 视图对象通过 ecs.Entity.remove(ModuleViewComp) 删除组件是触发组件处理自定义释放逻辑 */
|
|
||||||
reset() {
|
|
||||||
this.node.destroy();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
{
|
|
||||||
"ver": "4.0.23",
|
|
||||||
"importer": "typescript",
|
|
||||||
"imported": true,
|
|
||||||
"uuid": "fad26a63-4765-435a-bab6-daf8fa8476e1",
|
|
||||||
"files": [],
|
|
||||||
"subMetas": {},
|
|
||||||
"userData": {}
|
|
||||||
}
|
|
||||||
@@ -1,75 +0,0 @@
|
|||||||
import { _decorator, Label, Node, ProgressBar, resources, Sprite, SpriteAtlas, tween, 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 { ButtonTouchLong } from "../../../../extensions/oops-plugin-framework/assets/libs/gui/button/ButtonTouchLong";
|
|
||||||
import { EnhancedButtonTouchLong } from "../common/EnhancedButtonTouchLong";
|
|
||||||
import { GameEvent } from "../common/config/GameEvent";
|
|
||||||
import { HeroViewComp } from "../hero/HeroViewComp";
|
|
||||||
import { HeroModelComp } from "../hero/HeroModelComp";
|
|
||||||
import { MasterModelComp } from "../hero/MasterModel";
|
|
||||||
import { FriendModelComp } from "../hero/FriendModel";
|
|
||||||
import { HeroInfo } from "../common/config/heroSet";
|
|
||||||
import { FacSet } from "../common/config/BoxSet";
|
|
||||||
|
|
||||||
const { ccclass, property } = _decorator;
|
|
||||||
|
|
||||||
/** 视图层对象 */
|
|
||||||
@ccclass('BarCompComp')
|
|
||||||
@ecs.register('BarComp', false)
|
|
||||||
export class BarCompComp extends CCComp {
|
|
||||||
hero:HeroViewComp = null;
|
|
||||||
friend:HeroViewComp = null;
|
|
||||||
boss:HeroViewComp = null;
|
|
||||||
/** 视图层逻辑代码分离演示 */
|
|
||||||
protected onLoad(): void {
|
|
||||||
this.on(GameEvent.FightReady,this.readay,this)
|
|
||||||
this.on(GameEvent.MasterCalled,this.master_called,this)
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
start() {
|
|
||||||
// this.boss_bar = this.node.getChildByName("bar");
|
|
||||||
// var entity = this.ent as ecs.Entity; // ecs.Entity 可转为当前模块的具体实体对象
|
|
||||||
// this.on(ModuleEvent.Cmd, this.onHandler, this);
|
|
||||||
}
|
|
||||||
private readay(){
|
|
||||||
this.node.getChildByName("bar").active = true
|
|
||||||
}
|
|
||||||
private master_called(e:any,data:any){
|
|
||||||
this.node.getChildByName("bar").active = true
|
|
||||||
let show=this.node.getChildByName("bar").getChildByName("hero")
|
|
||||||
var icon_path = "game/heros/herois"
|
|
||||||
resources.load(icon_path, SpriteAtlas, (err: any, atlas) => {
|
|
||||||
const sprite = show.getChildByName("icon").getComponent(Sprite);
|
|
||||||
sprite.spriteFrame = atlas.getSpriteFrame(HeroInfo[data.uuid].path);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
show_master_more(){
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
hide_master_more(){
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
update_bar(){
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
/** 全局消息逻辑处理 */
|
|
||||||
// private onHandler(event: string, args: any) {
|
|
||||||
// switch (event) {
|
|
||||||
// case ModuleEvent.Cmd:
|
|
||||||
// break;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
/** 视图对象通过 ecs.Entity.remove(ModuleViewComp) 删除组件是触发组件处理自定义释放逻辑 */
|
|
||||||
reset() {
|
|
||||||
this.node.destroy();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
{
|
|
||||||
"ver": "4.0.23",
|
|
||||||
"importer": "typescript",
|
|
||||||
"imported": true,
|
|
||||||
"uuid": "4276d4e1-37ff-48c1-836b-d261827c57fe",
|
|
||||||
"files": [],
|
|
||||||
"subMetas": {},
|
|
||||||
"userData": {}
|
|
||||||
}
|
|
||||||
@@ -1,224 +0,0 @@
|
|||||||
import { _decorator, resources, Sprite, SpriteAtlas ,Node, ProgressBar, tween, v3, Label, Animation} 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 { CdType, 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 { HeroInfo } from "../common/config/heroSet";
|
|
||||||
|
|
||||||
const { ccclass, property } = _decorator;
|
|
||||||
|
|
||||||
/** 视图层对象 */
|
|
||||||
@ccclass('EquipSkillComp')
|
|
||||||
@ecs.register('EquipSkill', false)
|
|
||||||
export class EquipSkillComp extends CCComp {
|
|
||||||
skill1:any=null
|
|
||||||
skill2:any=null
|
|
||||||
boxs:Node=null
|
|
||||||
skill1_cd_bar_progress:any=null
|
|
||||||
skill2_cd_bar_progress:any=null
|
|
||||||
max_show:boolean=false
|
|
||||||
/** 视图层逻辑代码分离演示 */
|
|
||||||
onLoad() {
|
|
||||||
this.on(GameEvent.UseSkillCard, this.get_skill, this);
|
|
||||||
this.on(GameEvent.FightReady,this.fight_ready,this)
|
|
||||||
this.on(GameEvent.MasterCalled,this.master_called,this)
|
|
||||||
this.boxs=this.node.getChildByName("boxs")
|
|
||||||
this.skill1_cd_bar_progress=this.boxs.getChildByName("skill1").getChildByName("icon").getChildByName("cd").getComponent(ProgressBar)
|
|
||||||
this.skill2_cd_bar_progress=this.boxs.getChildByName("skill2").getChildByName("icon").getChildByName("cd").getComponent(ProgressBar)
|
|
||||||
this.boxs.getChildByName("skill2").getChildByName("icon").getChildByName("cd").active=false
|
|
||||||
}
|
|
||||||
start(){
|
|
||||||
this.fight_ready()
|
|
||||||
}
|
|
||||||
private master_called(e:any,data:any){
|
|
||||||
console.log("[EquipSkillComp]: master_called",data)
|
|
||||||
let hero=HeroInfo[data.uuid]
|
|
||||||
if(hero.skills.length>0){
|
|
||||||
this.get_skill(null,{slot:"skill1",uuid:hero.skills[1]})
|
|
||||||
this.get_skill(null,{slot:"skill2",uuid:hero.skills[2]})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fight_ready(){
|
|
||||||
this.boxs=this.node.getChildByName("boxs")
|
|
||||||
console.log("[EquipSkillComp]: fight_ready",this.node)
|
|
||||||
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.hide_skill_get(null,"skill1")
|
|
||||||
this.hide_skill_get(null,"skill2")
|
|
||||||
this.hide_skill_get(null,"skill3")
|
|
||||||
this.hide_skill_change(null,"skill1")
|
|
||||||
this.hide_skill_change(null,"skill2")
|
|
||||||
this.hide_skill_change(null,"skill3")
|
|
||||||
this.skill1={
|
|
||||||
uuid:0,
|
|
||||||
name:"skill1",
|
|
||||||
type:0, //1 被动 0 主动
|
|
||||||
level:0,
|
|
||||||
quality:0,
|
|
||||||
cd:0,
|
|
||||||
cd_time:0,
|
|
||||||
active:false,
|
|
||||||
}
|
|
||||||
this.skill2={
|
|
||||||
uuid:0,
|
|
||||||
name:"skill2",
|
|
||||||
type:0,//
|
|
||||||
level:0,
|
|
||||||
quality:0,
|
|
||||||
cd:0,
|
|
||||||
cd_time:0,
|
|
||||||
active:false,
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
update(dt: number): void {
|
|
||||||
if(!smc.mission.play||smc.mission.pause) return
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
show_max(){
|
|
||||||
|
|
||||||
this.boxs.getChildByName("skill2").getChildByName("light").active=true
|
|
||||||
this.boxs.getChildByName("skill2").getComponent(Animation).play()
|
|
||||||
}
|
|
||||||
hide_max(){
|
|
||||||
this.max_show=false
|
|
||||||
this.boxs.getChildByName("skill2").getChildByName("light").active=false
|
|
||||||
this.boxs.getChildByName("skill2").setScale(1,1,1)
|
|
||||||
this.boxs.getChildByName("skill2").getComponent(Animation).stop()
|
|
||||||
}
|
|
||||||
do_skill1(){
|
|
||||||
console.log("do_skill1")
|
|
||||||
this.skill1.cd_time=0
|
|
||||||
tween(this.boxs.getChildByName("skill1")).to(0.1, {scale:v3(1.2,1.2,1)},{onComplete:()=>{
|
|
||||||
tween(this.boxs.getChildByName("skill1")).to(0.2, {scale:v3(1,1,1)}).start()
|
|
||||||
}}).start()
|
|
||||||
this.do_skill(this.skill1.uuid)
|
|
||||||
}
|
|
||||||
|
|
||||||
do_skill2(){
|
|
||||||
tween(this.boxs.getChildByName("skill2")).to(0.1, {scale:v3(1.5,1.5,1)},{onComplete:()=>{
|
|
||||||
tween(this.boxs.getChildByName("skill2")).to(0.2, {scale:v3(1,1,1)}).start()
|
|
||||||
}}).start()
|
|
||||||
this.do_skill(this.skill2.uuid)
|
|
||||||
this.hide_max()
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
do_skill(uuid:number){
|
|
||||||
oops.message.dispatchEvent(GameEvent.CastHeroSkill,uuid)
|
|
||||||
}
|
|
||||||
|
|
||||||
get_skill(e:GameEvent,data:any){
|
|
||||||
// console.log("get_skill",data)
|
|
||||||
switch(data.slot){
|
|
||||||
case "skill1":
|
|
||||||
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 icon1 = this.boxs.getChildByName("skill1").getChildByName("icon")
|
|
||||||
icon1.active=true
|
|
||||||
if(SkillSet[data.uuid].CdType!=CdType.cd){
|
|
||||||
icon1.getChildByName("cd").active=false
|
|
||||||
}
|
|
||||||
var icon_path = "game/heros/cards"
|
|
||||||
resources.load(icon_path, SpriteAtlas, (err: any, atlas) => {
|
|
||||||
const sprite = icon1.getChildByName("skill").getComponent(Sprite);
|
|
||||||
sprite.spriteFrame = atlas.getSpriteFrame(SkillSet[data.uuid].path);
|
|
||||||
});
|
|
||||||
break
|
|
||||||
case "skill2":
|
|
||||||
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 icon2 = this.boxs.getChildByName("skill2").getChildByName("icon")
|
|
||||||
icon2.active=true
|
|
||||||
var icon_path = "game/heros/cards"
|
|
||||||
resources.load(icon_path, SpriteAtlas, (err: any, atlas) => {
|
|
||||||
const sprite = icon2.getChildByName("skill").getComponent(Sprite);
|
|
||||||
sprite.spriteFrame = atlas.getSpriteFrame(SkillSet[data.uuid].path);
|
|
||||||
});
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
call_skill_card(e:any,data:any){
|
|
||||||
oops.message.dispatchEvent(GameEvent.HeroSkillSelect,{slot:data})
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
private show_skill_get(e:string){
|
|
||||||
if(this.skill1.uuid==0){
|
|
||||||
this.boxs.getChildByName("skill1").getChildByName("get").active =true
|
|
||||||
this.boxs.getChildByName("skill1").getChildByName("light").active=true
|
|
||||||
this.boxs.getChildByName("skill1").getChildByName("tip").active =true
|
|
||||||
this.boxs.getChildByName("skill1").getChildByName("tip").getComponent(Label).string="学习"
|
|
||||||
}
|
|
||||||
if(this.skill2.uuid==0&&this.skill1.uuid!=0){
|
|
||||||
this.boxs.getChildByName("skill2").getChildByName("get").active =true
|
|
||||||
this.boxs.getChildByName("skill2").getChildByName("light").active=true
|
|
||||||
this.boxs.getChildByName("skill2").getChildByName("tip").active =true
|
|
||||||
this.boxs.getChildByName("skill2").getChildByName("tip").getComponent(Label).string="学习"
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
show_info(e:any,data:any){
|
|
||||||
switch(data){
|
|
||||||
case "skill1":
|
|
||||||
console.log("[EquipSkillComp]: show_info",this.skill1)
|
|
||||||
break
|
|
||||||
case "skill2":
|
|
||||||
console.log("[EquipSkillComp]: show_info",this.skill2)
|
|
||||||
break
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private hide_skill_get(e:any,data:string){
|
|
||||||
this.boxs.getChildByName("skill1").getChildByName("get").active =false
|
|
||||||
this.boxs.getChildByName("skill1").getChildByName("tip").active =false
|
|
||||||
this.boxs.getChildByName("skill1").getChildByName("light").active=false
|
|
||||||
|
|
||||||
this.boxs.getChildByName("skill2").getChildByName("get").active =false
|
|
||||||
this.boxs.getChildByName("skill2").getChildByName("tip").active =false
|
|
||||||
this.boxs.getChildByName("skill2").getChildByName("light").active=false
|
|
||||||
|
|
||||||
this.boxs.getChildByName("skill3").getChildByName("get").active =false
|
|
||||||
this.boxs.getChildByName("skill3").getChildByName("tip").active =false
|
|
||||||
this.boxs.getChildByName("skill3").getChildByName("light").active=false
|
|
||||||
}
|
|
||||||
|
|
||||||
private show_skill_change(e:string){
|
|
||||||
if(this.skill1.uuid!=0){
|
|
||||||
this.boxs.getChildByName("skill1").getChildByName("change").active =true
|
|
||||||
}
|
|
||||||
if(this.skill2.uuid!=0){
|
|
||||||
this.boxs.getChildByName("skill2").getChildByName("change").active =true
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
private hide_skill_change(e:any,data:any){
|
|
||||||
this.boxs.getChildByName("skill1").getChildByName("change").active =false
|
|
||||||
this.boxs.getChildByName("skill2").getChildByName("change").active =false
|
|
||||||
this.boxs.getChildByName("skill3").getChildByName("change").active =false
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/** 视图对象通过 ecs.Entity.remove(ModuleViewComp) 删除组件是触发组件处理自定义释放逻辑 */
|
|
||||||
reset() {
|
|
||||||
this.node.destroy();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
{
|
|
||||||
"ver": "4.0.23",
|
|
||||||
"importer": "typescript",
|
|
||||||
"imported": true,
|
|
||||||
"uuid": "b316181b-0323-4100-8d4d-4b68529d3c19",
|
|
||||||
"files": [],
|
|
||||||
"subMetas": {},
|
|
||||||
"userData": {}
|
|
||||||
}
|
|
||||||
@@ -1,309 +0,0 @@
|
|||||||
import { _decorator, Component, Label, 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, EquipAttrTarget, EquipSpecialAttr} from '../common/config/Equips';
|
|
||||||
import { BuffAttr, DebuffAttr, geDebuffNum, getBuffNum } from '../common/config/SkillSet';
|
|
||||||
import { FightSet } from '../common/config/Mission';
|
|
||||||
import { Quality } from '../common/config/CardSet';
|
|
||||||
const { ccclass, property } = _decorator;
|
|
||||||
|
|
||||||
@ccclass('EquipsComp')
|
|
||||||
export class EquipsComp extends Component {
|
|
||||||
weapon:any=null
|
|
||||||
armor:any=null
|
|
||||||
accessory:any=null
|
|
||||||
boxs:Node=null
|
|
||||||
// attrs:any={
|
|
||||||
// hero_buff:getBuffNum(),
|
|
||||||
// enemy_buff:getBuffNum(),
|
|
||||||
// }
|
|
||||||
/** 视图层逻辑代码分离演示 */
|
|
||||||
onLoad() {
|
|
||||||
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")
|
|
||||||
oops.message.on(GameEvent.HeroLvUp,this.hero_lv_up,this)
|
|
||||||
|
|
||||||
}
|
|
||||||
hero_lv_up(e:GameEvent,data:any){
|
|
||||||
console.log("[EquipsComp]:hero_lv_up",data)
|
|
||||||
switch(data.lv){
|
|
||||||
case FightSet.WEAPON_LV:
|
|
||||||
this.show_equip_get("weapon")
|
|
||||||
break
|
|
||||||
case FightSet.ARMOR_LV:
|
|
||||||
this.show_equip_get("armor")
|
|
||||||
break
|
|
||||||
case FightSet.SHIELD_LV:
|
|
||||||
this.show_equip_get("shield")
|
|
||||||
break
|
|
||||||
case FightSet.ACCESSORY_LV:
|
|
||||||
this.show_equip_get("accessory")
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
|
||||||
equip_stone_up(e:GameEvent,data:any){
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
call_equip_card(e:any,data:any){
|
|
||||||
oops.message.dispatchEvent(GameEvent.EquipSelect,{slot:data})
|
|
||||||
|
|
||||||
}
|
|
||||||
up_equip_card(e:any,data:any){
|
|
||||||
oops.message.dispatchEvent(GameEvent.EquipSelect,{slot:data})
|
|
||||||
|
|
||||||
}
|
|
||||||
start(){
|
|
||||||
this.fight_ready()
|
|
||||||
}
|
|
||||||
fight_ready(){
|
|
||||||
this.hide_equip_get(null,"weapon")
|
|
||||||
this.hide_equip_get(null,"armor")
|
|
||||||
this.hide_equip_get(null,"accessory")
|
|
||||||
this.boxs.getChildByName("weapon").getChildByName("icon").active=false
|
|
||||||
this.boxs.getChildByName("armor").getChildByName("icon").active=false
|
|
||||||
this.boxs.getChildByName("accessory").getChildByName("icon").active=false
|
|
||||||
this.weapon={
|
|
||||||
uuid:0,
|
|
||||||
name:"weapon",
|
|
||||||
type:"weapon",
|
|
||||||
level:0,
|
|
||||||
}
|
|
||||||
this.armor={
|
|
||||||
uuid:0,
|
|
||||||
name:"armor",
|
|
||||||
type:"armor",
|
|
||||||
level:0,
|
|
||||||
}
|
|
||||||
this.accessory={
|
|
||||||
uuid:0,
|
|
||||||
name:"accessory",
|
|
||||||
type:"accessory",
|
|
||||||
level:0,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
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)
|
|
||||||
}
|
|
||||||
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)
|
|
||||||
}
|
|
||||||
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)
|
|
||||||
}
|
|
||||||
// this.count_attrs()
|
|
||||||
}
|
|
||||||
show_weapon(uuid:number){
|
|
||||||
let icon = this.boxs.getChildByName("weapon").getChildByName("icon")
|
|
||||||
icon.active=true
|
|
||||||
var icon_path = "game/heros/equips2"
|
|
||||||
resources.load(icon_path, SpriteAtlas, (err: any, atlas) => {
|
|
||||||
const sprite = icon.getChildByName("icon").getComponent(Sprite);
|
|
||||||
sprite.spriteFrame = atlas.getSpriteFrame(EquipInfo[uuid].path);
|
|
||||||
});
|
|
||||||
icon.getChildByName("q1").active=EquipInfo[uuid].quality==Quality.WHITE
|
|
||||||
icon.getChildByName("q2").active=EquipInfo[uuid].quality==Quality.GREEN
|
|
||||||
icon.getChildByName("q3").active=EquipInfo[uuid].quality==Quality.BLUE
|
|
||||||
icon.getChildByName("q4").active=EquipInfo[uuid].quality==Quality.PURPLE
|
|
||||||
icon.getChildByName("q5").active=EquipInfo[uuid].quality==Quality.ORANGE
|
|
||||||
|
|
||||||
}
|
|
||||||
show_armor(uuid:number){
|
|
||||||
let icon = this.boxs.getChildByName("armor").getChildByName("icon")
|
|
||||||
icon.active=true
|
|
||||||
var icon_path = "game/heros/equips2"
|
|
||||||
resources.load(icon_path, SpriteAtlas, (err: any, atlas) => {
|
|
||||||
const sprite = icon.getChildByName("icon").getComponent(Sprite);
|
|
||||||
sprite.spriteFrame = atlas.getSpriteFrame(EquipInfo[uuid].path);
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
icon.getChildByName("q1").active=EquipInfo[uuid].quality==Quality.WHITE
|
|
||||||
icon.getChildByName("q2").active=EquipInfo[uuid].quality==Quality.GREEN
|
|
||||||
icon.getChildByName("q3").active=EquipInfo[uuid].quality==Quality.BLUE
|
|
||||||
icon.getChildByName("q4").active=EquipInfo[uuid].quality==Quality.PURPLE
|
|
||||||
icon.getChildByName("q5").active=EquipInfo[uuid].quality==Quality.ORANGE
|
|
||||||
}
|
|
||||||
show_accessory(uuid:number){
|
|
||||||
let icon = this.boxs.getChildByName("accessory").getChildByName("icon")
|
|
||||||
icon.active=true
|
|
||||||
var icon_path = "game/heros/equips2"
|
|
||||||
resources.load(icon_path, SpriteAtlas, (err: any, atlas) => {
|
|
||||||
const sprite = icon.getChildByName("icon").getComponent(Sprite);
|
|
||||||
sprite.spriteFrame = atlas.getSpriteFrame(EquipInfo[uuid].path);
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
icon.getChildByName("q1").active=EquipInfo[uuid].quality==Quality.WHITE
|
|
||||||
icon.getChildByName("q2").active=EquipInfo[uuid].quality==Quality.GREEN
|
|
||||||
icon.getChildByName("q3").active=EquipInfo[uuid].quality==Quality.BLUE
|
|
||||||
icon.getChildByName("q4").active=EquipInfo[uuid].quality==Quality.PURPLE
|
|
||||||
icon.getChildByName("q5").active=EquipInfo[uuid].quality==Quality.ORANGE
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
// count_attrs(){
|
|
||||||
// // 重置所有属性
|
|
||||||
// this.reset_attrs();
|
|
||||||
// console.log("[EquipsComp]:重置后的属性", this.attrs);
|
|
||||||
|
|
||||||
// // 获取所有装备的属性
|
|
||||||
// let weapon_buffs = this.weapon.uuid ? EquipInfo[this.weapon.uuid]?.buff || [] : [];
|
|
||||||
// let armor_buffs = this.armor.uuid ? EquipInfo[this.armor.uuid]?.buff || [] : [];
|
|
||||||
// let accessory_buffs = this.accessory.uuid ? EquipInfo[this.accessory.uuid]?.buff || [] : [];
|
|
||||||
// let weapon_special_attr = this.weapon.uuid ? EquipInfo[this.weapon.uuid]?.special_attr : [];
|
|
||||||
// let armor_special_attr = this.armor.uuid ? EquipInfo[this.armor.uuid]?.special_attr : [];
|
|
||||||
// let accessory_special_attr = this.accessory.uuid ? EquipInfo[this.accessory.uuid]?.special_attr : [];
|
|
||||||
|
|
||||||
// console.log("[EquipsComp]:weapon_special_attr", weapon_special_attr);
|
|
||||||
// console.log("[EquipsComp]:armor_special_attr", armor_special_attr);
|
|
||||||
// console.log("[EquipsComp]:accessory_special_attr", accessory_special_attr);
|
|
||||||
// console.log("[EquipsComp]:weapon_buffs", weapon_buffs);
|
|
||||||
// console.log("[EquipsComp]:防具属性", armor_buffs);
|
|
||||||
// console.log("[EquipsComp]:饰品属性", accessory_buffs);
|
|
||||||
// const all_special_attr=[...weapon_special_attr,...armor_special_attr,...accessory_special_attr]
|
|
||||||
|
|
||||||
// let equip_special_attr=this.count_equip_special_attr(all_special_attr)
|
|
||||||
// oops.message.dispatchEvent(GameEvent.ChangeATK_EQUIP_SPECIAL_ATTR,equip_special_attr)
|
|
||||||
|
|
||||||
// // 合并所有装备属性
|
|
||||||
// const allBuff = [...weapon_buffs, ...armor_buffs, ...accessory_buffs];
|
|
||||||
// console.log("[EquipsComp]:合并后的所有属性", allBuff);
|
|
||||||
// // 计算每个目标的属性加成
|
|
||||||
// allBuff.forEach(attr => {
|
|
||||||
// const target = attr.target || EquipAttrTarget.HERO;
|
|
||||||
// let targetKey = null;
|
|
||||||
// // 根据目标类型获取对应的key
|
|
||||||
// switch (target) {
|
|
||||||
// case EquipAttrTarget.HERO:
|
|
||||||
// targetKey = 'hero_buff';
|
|
||||||
// break;
|
|
||||||
// }
|
|
||||||
// this.add_attr(targetKey,attr)
|
|
||||||
// });
|
|
||||||
|
|
||||||
// console.log("[EquipsComp]:debuff buff attrs ", this.attrs);
|
|
||||||
// oops.message.dispatchEvent(GameEvent.EquipChange, this.attrs);
|
|
||||||
// }
|
|
||||||
|
|
||||||
// count_equip_special_attr(all_special_attr:any[]){
|
|
||||||
// //特殊属性附加 - 直接使用枚举值作为属性名
|
|
||||||
// let equip_special_attr = {
|
|
||||||
// [EquipSpecialAttr.ICE]: 0,
|
|
||||||
// [EquipSpecialAttr.FIRE]: 0,
|
|
||||||
// [EquipSpecialAttr.WIND]: 0,
|
|
||||||
// [EquipSpecialAttr.ATK_ADD_GLOD]: 0,
|
|
||||||
// [EquipSpecialAttr.ATK_ADD_MASTER_ATK]: 0,
|
|
||||||
// [EquipSpecialAttr.ATK_ADD_MASTER_HP]: 0,
|
|
||||||
// [EquipSpecialAttr.DOUBLE_ATKED]: 0,
|
|
||||||
// [EquipSpecialAttr.ATKED_ADD_SKILL_STONE]: 0,
|
|
||||||
// [EquipSpecialAttr.ATK_ADD_VALUE]: 0,
|
|
||||||
// };
|
|
||||||
|
|
||||||
// console.log("[EquipsComp]:all_special_attr",all_special_attr)
|
|
||||||
|
|
||||||
// // 直接使用枚举值累加属性
|
|
||||||
// all_special_attr.forEach(special_attr => {
|
|
||||||
// if (special_attr && equip_special_attr.hasOwnProperty(special_attr.special_attr)) {
|
|
||||||
// equip_special_attr[special_attr.special_attr] += special_attr.special_attr_value;
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
|
|
||||||
// console.log("[EquipsComp]:equip_special_attr",equip_special_attr)
|
|
||||||
// return equip_special_attr
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
// add_attr(targetKey:string,attr:any){
|
|
||||||
// if(targetKey){
|
|
||||||
// this.attrs[targetKey][BuffAttr[attr.type]] += attr.value;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
// 重置所有属性为0
|
|
||||||
private reset_attrs() {
|
|
||||||
// 创建新的属性对象
|
|
||||||
// const newAttrs = {
|
|
||||||
// hero_buff: getBuffNum(),
|
|
||||||
// enemy_buff: getBuffNum(),
|
|
||||||
// };
|
|
||||||
|
|
||||||
// // 替换整个 attrs 对象
|
|
||||||
// this.attrs = newAttrs;
|
|
||||||
|
|
||||||
// console.log("重置属性", {
|
|
||||||
// hero_buff: this.attrs.hero_buff,
|
|
||||||
// enemy_buff: this.attrs.enemy_buff,
|
|
||||||
// });
|
|
||||||
}
|
|
||||||
|
|
||||||
equip_remove(e:GameEvent,data:any){
|
|
||||||
console.log("equip_remove",data)
|
|
||||||
}
|
|
||||||
update(dt: number): void {
|
|
||||||
if(!smc.mission.play||smc.mission.pause) return
|
|
||||||
}
|
|
||||||
|
|
||||||
private show_equip_get(e:string){
|
|
||||||
switch(e){
|
|
||||||
case "weapon":
|
|
||||||
this.boxs.getChildByName("weapon").getChildByName("get").active =true
|
|
||||||
this.boxs.getChildByName("weapon").getChildByName("light").active=true
|
|
||||||
this.boxs.getChildByName("weapon").getChildByName("tip").active=true
|
|
||||||
this.boxs.getChildByName("weapon").getChildByName("tip").getComponent(Label).string="获取"
|
|
||||||
break
|
|
||||||
case "armor":
|
|
||||||
this.boxs.getChildByName("armor").getChildByName("get").active =true
|
|
||||||
this.boxs.getChildByName("armor").getChildByName("light").active=true
|
|
||||||
this.boxs.getChildByName("armor").getChildByName("tip").active=true
|
|
||||||
this.boxs.getChildByName("armor").getChildByName("tip").getComponent(Label).string="获取"
|
|
||||||
break
|
|
||||||
case "accessory":
|
|
||||||
this.boxs.getChildByName("accessory").getChildByName("get").active =true
|
|
||||||
this.boxs.getChildByName("accessory").getChildByName("light").active=true
|
|
||||||
this.boxs.getChildByName("accessory").getChildByName("tip").active=true
|
|
||||||
this.boxs.getChildByName("accessory").getChildByName("tip").getComponent(Label).string="获取"
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private hide_equip_get(e:any,data:string){
|
|
||||||
this.scheduleOnce(()=>{
|
|
||||||
if(smc.vmdata.mission_data.equip_stone > smc.vmdata.mission_data.equip_stone_max) return
|
|
||||||
this.boxs.getChildByName("weapon").getChildByName("get").active =false
|
|
||||||
this.boxs.getChildByName("weapon").getChildByName("change").active =false
|
|
||||||
this.boxs.getChildByName("weapon").getChildByName("light").active=false
|
|
||||||
this.boxs.getChildByName("weapon").getChildByName("tip").active=false
|
|
||||||
this.boxs.getChildByName("armor").getChildByName("get").active =false
|
|
||||||
this.boxs.getChildByName("armor").getChildByName("change").active =false
|
|
||||||
this.boxs.getChildByName("armor").getChildByName("light").active=false
|
|
||||||
this.boxs.getChildByName("armor").getChildByName("tip").active=false
|
|
||||||
this.boxs.getChildByName("accessory").getChildByName("get").active =false
|
|
||||||
this.boxs.getChildByName("accessory").getChildByName("change").active =false
|
|
||||||
this.boxs.getChildByName("accessory").getChildByName("light").active=false
|
|
||||||
this.boxs.getChildByName("accessory").getChildByName("tip").active=false
|
|
||||||
},0.5)
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
{
|
|
||||||
"ver": "4.0.23",
|
|
||||||
"importer": "typescript",
|
|
||||||
"imported": true,
|
|
||||||
"uuid": "a8fa7cb8-6ae9-42bd-8b54-7510b5757576",
|
|
||||||
"files": [],
|
|
||||||
"subMetas": {},
|
|
||||||
"userData": {}
|
|
||||||
}
|
|
||||||
@@ -1,130 +0,0 @@
|
|||||||
import { _decorator, Component, Node, Vec3 } from 'cc';
|
|
||||||
import { oops } from 'db://oops-framework/core/Oops';
|
|
||||||
import { GameEvent } from '../common/config/GameEvent';
|
|
||||||
import { geDebuffNum, getBuffNum, BuffAttr, DebuffAttr, SkillSet } from '../common/config/SkillSet';
|
|
||||||
import { Timer } from 'db://oops-framework/core/common/timer/Timer';
|
|
||||||
import { FightSet } from '../common/config/Mission';
|
|
||||||
import { SuperCards, SuperCardsType } from '../common/config/CardSet';
|
|
||||||
import { EquipSpecialAttr } from '../common/config/Equips';
|
|
||||||
import { ecs } from 'db://oops-framework/libs/ecs/ECS';
|
|
||||||
import { Skill } from '../skills/Skill';
|
|
||||||
import { MasterModelComp } from '../hero/MasterModel';
|
|
||||||
import { HeroViewComp } from '../hero/HeroViewComp';
|
|
||||||
import { MonModelComp } from '../hero/MonModelComp';
|
|
||||||
const { ccclass, property } = _decorator;
|
|
||||||
|
|
||||||
@ccclass('FightConComp')
|
|
||||||
export class FightConComp extends Component {
|
|
||||||
//装备 及 光环效果 物品存在生效 enemy_buff 是针对 怪物的debuff 偶尔也有buff 需要注意
|
|
||||||
hero_buff=getBuffNum()
|
|
||||||
enemy_buff=getBuffNum()
|
|
||||||
|
|
||||||
|
|
||||||
//注意临时buff和debuff 每种buff的值 必须都一样 多种值 战斗处理复杂 暂时放弃
|
|
||||||
atk_type:number=0;
|
|
||||||
//装备特殊属性 触发后 局内永久生效
|
|
||||||
atk_add_glod:number=0
|
|
||||||
atk_add_master_atk:number=0
|
|
||||||
atk_add_master_hp:number=0
|
|
||||||
double_atked:number=0
|
|
||||||
atked_add_skill_stone:number=0
|
|
||||||
atk_add_value:number=0
|
|
||||||
|
|
||||||
//卡牌特效
|
|
||||||
card_atk_add:number=0 //卡牌特效 攻击提高攻击力效果 额外添加值
|
|
||||||
card_hp_add:number=0 //卡牌特效 攻击提高生命值效果 额外添加值
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
aoe_pos:Vec3=new Vec3(-280,20,0)
|
|
||||||
buff_pos:Vec3=new Vec3(-280,100,0)
|
|
||||||
debuff_pos:Vec3=new Vec3(-280,100,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)
|
|
||||||
oops.message.on(GameEvent.ChangeATK_EQUIP_SPECIAL_ATTR,this.change_equip_special_attr,this)
|
|
||||||
oops.message.on(GameEvent.UseSpecialCard,this.use_special_card,this)
|
|
||||||
|
|
||||||
}
|
|
||||||
protected start(): void {
|
|
||||||
|
|
||||||
}
|
|
||||||
change_equip_special_attr(e:GameEvent,data:any){
|
|
||||||
console.log("[FightConComp]:change_equip_special_attr",data)
|
|
||||||
this.atk_add_value=data[EquipSpecialAttr.ATK_ADD_VALUE]
|
|
||||||
this.atk_add_glod=data[EquipSpecialAttr.ATK_ADD_GLOD]
|
|
||||||
this.atk_add_master_atk=data[EquipSpecialAttr.ATK_ADD_MASTER_ATK]+this.atk_add_value+(this.card_atk_add > 0 ? this.card_atk_add:0) //装备特殊属性 英雄/伙伴 攻击力增加
|
|
||||||
this.atk_add_master_hp=data[EquipSpecialAttr.ATK_ADD_MASTER_HP]+this.atk_add_value+(this.card_hp_add > 0 ? this.card_hp_add:0) //装备特殊属性 英雄/伙伴 生命值增加
|
|
||||||
this.double_atked=data[EquipSpecialAttr.DOUBLE_ATKED]
|
|
||||||
this.atked_add_skill_stone=data[EquipSpecialAttr.ATKED_ADD_SKILL_STONE]
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private equip_change(e:GameEvent,equip:any){
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
private fight_ready(e:GameEvent){
|
|
||||||
this.clearAlls()
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
private use_special_card(e:GameEvent,data:any){
|
|
||||||
console.log("[FightConComp]:use_special_card:",SuperCards[data.uuid])
|
|
||||||
switch(SuperCards[data.uuid].type){
|
|
||||||
case SuperCardsType.SPECIAL:
|
|
||||||
switch(data.uuid){
|
|
||||||
case 3001:
|
|
||||||
console.log("[FightConComp]:use_special_card:附魔宝典")
|
|
||||||
this.card_atk_add+=SuperCards[data.uuid].value1
|
|
||||||
break
|
|
||||||
case 3002:
|
|
||||||
console.log("[FightConComp]:use_special_card:附魔宝典")
|
|
||||||
this.card_hp_add+=SuperCards[data.uuid].value1
|
|
||||||
break
|
|
||||||
}
|
|
||||||
break
|
|
||||||
case SuperCardsType.AOE:
|
|
||||||
oops.message.dispatchEvent(GameEvent.MaxSkill,{uuid:SuperCards[data.uuid].value1})
|
|
||||||
break
|
|
||||||
case SuperCardsType.BUFF:
|
|
||||||
|
|
||||||
break
|
|
||||||
case SuperCardsType.DEBUFF:
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// /** 随机选择目标 */
|
|
||||||
// private pickRandomTarget(count: number=1): ecs.Entity[] {
|
|
||||||
// let entities = ecs.query(ecs.allOf(MonModelComp))
|
|
||||||
// const shuffled = [...entities].sort(() => 0.5 - Math.random());
|
|
||||||
// return shuffled.slice(0, count);
|
|
||||||
// }
|
|
||||||
|
|
||||||
private clearAlls() {
|
|
||||||
this.hero_buff=getBuffNum()
|
|
||||||
this.enemy_buff=getBuffNum()
|
|
||||||
this.atk_add_glod=0
|
|
||||||
this.atk_add_master_atk=0
|
|
||||||
this.atk_add_master_hp=0
|
|
||||||
this.double_atked=0
|
|
||||||
this.atked_add_skill_stone=0
|
|
||||||
this.atk_add_value=0
|
|
||||||
this.card_atk_add=0
|
|
||||||
this.card_hp_add=0
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
{
|
|
||||||
"ver": "4.0.23",
|
|
||||||
"importer": "typescript",
|
|
||||||
"imported": true,
|
|
||||||
"uuid": "7aec9f6c-509f-4b5d-9993-76ba73b5bdc8",
|
|
||||||
"files": [],
|
|
||||||
"subMetas": {},
|
|
||||||
"userData": {}
|
|
||||||
}
|
|
||||||
@@ -1,8 +1,11 @@
|
|||||||
import { _decorator, Component, Node } from 'cc';
|
import { _decorator, Animation, AnimationClip, Component, Label, Node, resources } from 'cc';
|
||||||
|
import { HeroInfo, HQuality } from '../common/config/heroSet';
|
||||||
|
import { smc } from '../common/SingletonModuleComp';
|
||||||
const { ccclass, property } = _decorator;
|
const { ccclass, property } = _decorator;
|
||||||
|
|
||||||
@ccclass('HCardUICom')
|
@ccclass('HCardUICom')
|
||||||
export class HCardUICom extends Component {
|
export class HCardUICom extends Component {
|
||||||
|
h_uuid:number=0
|
||||||
start() {
|
start() {
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -10,5 +13,31 @@ export class HCardUICom extends Component {
|
|||||||
update(deltaTime: number) {
|
update(deltaTime: number) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
update_data(uuid:number){
|
||||||
|
this.h_uuid=uuid
|
||||||
|
let hero_data = HeroInfo[uuid]
|
||||||
|
let hero= this.node.getChildByName("hero")
|
||||||
|
let anm_path=hero_data.path
|
||||||
|
resources.load("game/heros/hero/"+anm_path+"/idle", AnimationClip, (err, clip) => {
|
||||||
|
hero.getComponent(Animation).addClip(clip);
|
||||||
|
hero.getComponent(Animation).play("idle");
|
||||||
|
});
|
||||||
|
this.node.getChildByName("name").getComponent(Label).string=hero_data.name
|
||||||
|
this.node.getChildByName("lv").getChildByName("num").getComponent(Label).string=smc.heros[uuid].lv.toString()
|
||||||
|
this.node.getChildByName("slv").getChildByName("lv1").active=smc.heros[uuid].slv>=1
|
||||||
|
this.node.getChildByName("slv").getChildByName("lv2").active=smc.heros[uuid].slv>=2
|
||||||
|
this.node.getChildByName("slv").getChildByName("lv3").active=smc.heros[uuid].slv>=3
|
||||||
|
this.node.getChildByName("slv").getChildByName("lv4").active=smc.heros[uuid].slv>=4
|
||||||
|
this.node.getChildByName("slv").getChildByName("lv5").active=smc.heros[uuid].slv>=5
|
||||||
|
this.node.getChildByName("g").active=hero_data.quality==HQuality.GREEN
|
||||||
|
this.node.getChildByName("gg").active=hero_data.quality==HQuality.GREEN
|
||||||
|
this.node.getChildByName("b").active=hero_data.quality==HQuality.BLUE
|
||||||
|
this.node.getChildByName("bg").active=hero_data.quality==HQuality.BLUE
|
||||||
|
this.node.getChildByName("p").active=hero_data.quality==HQuality.PURPLE
|
||||||
|
this.node.getChildByName("pg").active=hero_data.quality==HQuality.PURPLE
|
||||||
|
this.node.getChildByName("y").active=hero_data.quality==HQuality.ORANGE
|
||||||
|
this.node.getChildByName("yg").active=hero_data.quality==HQuality.ORANGE
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
14
assets/script/game/map/HeroPageComp.ts
Normal file
14
assets/script/game/map/HeroPageComp.ts
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
import { _decorator, Component, Node } from 'cc';
|
||||||
|
const { ccclass, property } = _decorator;
|
||||||
|
|
||||||
|
@ccclass('HeroPageComp')
|
||||||
|
export class HeroPageComp extends Component {
|
||||||
|
start() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
update(deltaTime: number) {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
"ver": "4.0.23",
|
"ver": "4.0.23",
|
||||||
"importer": "typescript",
|
"importer": "typescript",
|
||||||
"imported": true,
|
"imported": true,
|
||||||
"uuid": "dc8e3ce8-1ced-41ab-bbf6-72310977465a",
|
"uuid": "985ee2ae-8a25-4d68-a4f3-d909f5b2c225",
|
||||||
"files": [],
|
"files": [],
|
||||||
"subMetas": {},
|
"subMetas": {},
|
||||||
"userData": {}
|
"userData": {}
|
||||||
@@ -1,246 +0,0 @@
|
|||||||
import { _decorator, resources, Sprite, SpriteAtlas ,Node, ProgressBar, tween, v3, Label, Animation, CCString, CCInteger, sp} 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 { CdType, 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 { HeroInfo } from "../common/config/heroSet";
|
|
||||||
|
|
||||||
const { ccclass, property } = _decorator;
|
|
||||||
|
|
||||||
/** 英雄数据接口 */
|
|
||||||
interface HeroData {
|
|
||||||
uuid: number;
|
|
||||||
name: string;
|
|
||||||
type: number; // 1 被动 0 主动
|
|
||||||
level: number;
|
|
||||||
quality: number;
|
|
||||||
cd: number;
|
|
||||||
cd_time: number;
|
|
||||||
active: boolean;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 视图层对象 */
|
|
||||||
@ccclass('HeroUiComp')
|
|
||||||
@ecs.register('HeroUi', false)
|
|
||||||
export class HeroUiComp extends CCComp {
|
|
||||||
heroes: HeroData[] = []
|
|
||||||
private readonly MAX_HEROES = 3
|
|
||||||
private readonly HERO_NODE_NAMES = ['hero1', 'hero2', 'hero3']
|
|
||||||
/** 视图层逻辑代码分离演示 */
|
|
||||||
onLoad() {
|
|
||||||
this.on(GameEvent.FightReady,this.fight_ready,this)
|
|
||||||
this.on(GameEvent.UseHeroCard,this.get_hero,this)
|
|
||||||
this.on(GameEvent.FightEnd,this.fight_end,this)
|
|
||||||
// this.node.getChildByName("icon").getChildByName("cd").active=false
|
|
||||||
}
|
|
||||||
start(){
|
|
||||||
this.fight_ready()
|
|
||||||
|
|
||||||
}
|
|
||||||
fight_end(){
|
|
||||||
this.heroes=[]
|
|
||||||
this.clearAllHeroIcons()
|
|
||||||
|
|
||||||
}
|
|
||||||
fight_ready(){
|
|
||||||
console.log("[HeroUiComp]: fight_ready",this.node)
|
|
||||||
this.heroes = []
|
|
||||||
for(let i = 0; i < this.MAX_HEROES; i++) {
|
|
||||||
this.heroes.push(this.createDefaultHero())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private createDefaultHero(): HeroData {
|
|
||||||
return {
|
|
||||||
uuid: 0,
|
|
||||||
name: "hero",
|
|
||||||
type: 0, //1 被动 0 主动
|
|
||||||
level: 1,
|
|
||||||
quality: 0,
|
|
||||||
cd: 0,
|
|
||||||
cd_time: 0,
|
|
||||||
active: false,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
update(dt: number): void {
|
|
||||||
if(!smc.mission.play||smc.mission.pause) return
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
get_hero(e: GameEvent, data: { uuid: number }) {
|
|
||||||
console.log("[HeroUiComp]: get_hero", data)
|
|
||||||
|
|
||||||
// 尝试升级现有英雄
|
|
||||||
if (this.tryUpgradeExistingHero(data.uuid)) {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// 添加新英雄
|
|
||||||
this.addNewHero(data)
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 尝试升级现有英雄
|
|
||||||
* @param uuid 英雄UUID
|
|
||||||
* @returns 是否成功升级
|
|
||||||
*/
|
|
||||||
private tryUpgradeExistingHero(uuid: number): boolean {
|
|
||||||
for (let i = 0; i < this.heroes.length; i++) {
|
|
||||||
if (this.heroes[i].uuid === uuid) {
|
|
||||||
this.heroes[i].level++
|
|
||||||
// 播放升级动画
|
|
||||||
this.playCardScaleAnimation(i)
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 添加新英雄
|
|
||||||
* @param data 英雄数据
|
|
||||||
*/
|
|
||||||
private addNewHero(data: { uuid: number }) {
|
|
||||||
const heroInfo = HeroInfo[data.uuid]
|
|
||||||
if (!heroInfo) {
|
|
||||||
console.error("[HeroUiComp]: Hero info not found for uuid:", data.uuid)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// 查找空闲位置
|
|
||||||
const emptySlotIndex = this.findEmptyHeroSlot()
|
|
||||||
if (emptySlotIndex === -1) {
|
|
||||||
console.warn("[HeroUiComp]: No empty slot available for new hero")
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// 设置英雄数据
|
|
||||||
this.heroes[emptySlotIndex] = {
|
|
||||||
uuid: data.uuid,
|
|
||||||
name: heroInfo.name,
|
|
||||||
type: heroInfo.type,
|
|
||||||
level: 1,
|
|
||||||
quality: heroInfo.quality,
|
|
||||||
cd: 0,
|
|
||||||
cd_time: 0,
|
|
||||||
active: false,
|
|
||||||
}
|
|
||||||
|
|
||||||
// 更新UI
|
|
||||||
this.updateHeroUI(emptySlotIndex, heroInfo)
|
|
||||||
// 播放新卡牌动画
|
|
||||||
this.playCardScaleAnimation(emptySlotIndex)
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查找空闲英雄槽位
|
|
||||||
* @returns 空闲槽位索引,-1表示没有空闲槽位
|
|
||||||
*/
|
|
||||||
private findEmptyHeroSlot(): number {
|
|
||||||
for (let i = 0; i < this.heroes.length; i++) {
|
|
||||||
if (this.heroes[i].uuid === 0) {
|
|
||||||
return i
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return -1
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 更新英雄UI(图标和信息)
|
|
||||||
* @param heroIndex 英雄索引
|
|
||||||
* @param heroInfo 英雄信息
|
|
||||||
*/
|
|
||||||
private updateHeroUI(heroIndex: number, heroInfo: { path: string }) {
|
|
||||||
const heroNodeName = this.HERO_NODE_NAMES[heroIndex]
|
|
||||||
const heroNode = this.node.getChildByName(heroNodeName)
|
|
||||||
if (!heroNode) return
|
|
||||||
|
|
||||||
const iconNode = heroNode.getChildByName("icon")
|
|
||||||
if (iconNode) {
|
|
||||||
iconNode.active = true
|
|
||||||
this.loadHeroIcon(iconNode, heroInfo.path)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 加载英雄图标
|
|
||||||
* @param iconNode 图标节点
|
|
||||||
* @param heroPath 英雄路径
|
|
||||||
*/
|
|
||||||
private loadHeroIcon(iconNode: Node, heroPath: string) {
|
|
||||||
iconNode.parent.getChildByName("iconbg").active=false
|
|
||||||
const icon_path = "game/heros/heros/"+heroPath
|
|
||||||
// resources.load(icon_path, sp.SkeletonData, (err, skeleton) => {
|
|
||||||
// if(err) return
|
|
||||||
// const spine = iconNode.getComponent(sp.Skeleton);
|
|
||||||
// if (spine) {
|
|
||||||
// spine.skeletonData = skeleton;
|
|
||||||
// spine.setAnimation(0, "Idle", true);
|
|
||||||
// }
|
|
||||||
// else{
|
|
||||||
// console.error("[HeroUiComp]: loadHeroIcon error",err)
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 播放卡牌缩放动画
|
|
||||||
* @param heroIndex 英雄索引
|
|
||||||
*/
|
|
||||||
private playCardScaleAnimation(heroIndex: number) {
|
|
||||||
const heroNodeName = this.HERO_NODE_NAMES[heroIndex]
|
|
||||||
const heroNode = this.node.getChildByName(heroNodeName)
|
|
||||||
if (!heroNode) return
|
|
||||||
|
|
||||||
// 停止可能存在的动画
|
|
||||||
tween(heroNode).stop()
|
|
||||||
|
|
||||||
// 播放缩放动画:放大 -> 恢复原始大小
|
|
||||||
tween(heroNode)
|
|
||||||
.to(0.1, { scale: v3(1.2, 1.2, 1) }, { easing: 'backOut' })
|
|
||||||
.to(0.15, { scale: v3(1, 1, 1) }, { easing: 'backOut' })
|
|
||||||
.start()
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 清空英雄图标
|
|
||||||
* @param heroIndex 英雄索引
|
|
||||||
*/
|
|
||||||
private clearHeroIcon(heroIndex: number) {
|
|
||||||
const heroNodeName = this.HERO_NODE_NAMES[heroIndex]
|
|
||||||
const heroNode = this.node.getChildByName(heroNodeName)
|
|
||||||
if (!heroNode) return
|
|
||||||
|
|
||||||
const iconNode = heroNode.getChildByName("icon")
|
|
||||||
if (iconNode) {
|
|
||||||
iconNode.active = false
|
|
||||||
}
|
|
||||||
heroNode.getChildByName("iconbg").active=true
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 清空所有英雄图标
|
|
||||||
*/
|
|
||||||
public clearAllHeroIcons() {
|
|
||||||
for (let i = 0; i < this.MAX_HEROES; i++) {
|
|
||||||
this.clearHeroIcon(i)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/** 视图对象通过 ecs.Entity.remove(ModuleViewComp) 删除组件是触发组件处理自定义释放逻辑 */
|
|
||||||
reset() {
|
|
||||||
this.node.destroy();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
{
|
|
||||||
"ver": "4.0.23",
|
|
||||||
"importer": "typescript",
|
|
||||||
"imported": true,
|
|
||||||
"uuid": "2b9bf809-2ad7-4169-be07-ad256ab89cb2",
|
|
||||||
"files": [],
|
|
||||||
"subMetas": {},
|
|
||||||
"userData": {}
|
|
||||||
}
|
|
||||||
@@ -1,39 +0,0 @@
|
|||||||
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('LifeComp')
|
|
||||||
export class LifeComp extends Component {
|
|
||||||
loss_life:number=0
|
|
||||||
protected onLoad(): void {
|
|
||||||
oops.message.on(GameEvent.FightReady,this.onFightReady,this)
|
|
||||||
oops.message.on(GameEvent.LifeChange,this.onLifeChange,this)
|
|
||||||
}
|
|
||||||
start() {
|
|
||||||
}
|
|
||||||
|
|
||||||
update(deltaTime: number) {
|
|
||||||
|
|
||||||
}
|
|
||||||
onFightReady(args: any) {
|
|
||||||
console.log("[LifeComp]:onMissionStart",args)
|
|
||||||
let nodes=this.node.children
|
|
||||||
nodes[0].active=true
|
|
||||||
nodes[1].active=true
|
|
||||||
nodes[2].active=true
|
|
||||||
this.loss_life=0
|
|
||||||
}
|
|
||||||
onLifeChange(args: any) {
|
|
||||||
console.log("[LifeComp]:onLifeChange loss_life:",this.loss_life)
|
|
||||||
if(this.loss_life >= 3) return
|
|
||||||
let nodes=this.node.children
|
|
||||||
nodes[this.loss_life].active=false
|
|
||||||
this.loss_life++
|
|
||||||
if(this.loss_life >= 3){
|
|
||||||
oops.message.dispatchEvent(GameEvent.FightEnd)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
{
|
|
||||||
"ver": "4.0.23",
|
|
||||||
"importer": "typescript",
|
|
||||||
"imported": true,
|
|
||||||
"uuid": "3bb0f1a5-485d-4c26-a592-9553f8c00f37",
|
|
||||||
"files": [],
|
|
||||||
"subMetas": {},
|
|
||||||
"userData": {}
|
|
||||||
}
|
|
||||||
@@ -10,7 +10,6 @@ import { HeroViewComp } from "../hero/HeroViewComp";
|
|||||||
import { oops } from "db://oops-framework/core/Oops";
|
import { oops } from "db://oops-framework/core/Oops";
|
||||||
import { HeroPos } from "../common/config/heroSet";
|
import { HeroPos } from "../common/config/heroSet";
|
||||||
import { FightSet } from "../common/config/Mission";
|
import { FightSet } from "../common/config/Mission";
|
||||||
import { FriendModelComp } from "../hero/FriendModel";
|
|
||||||
const { ccclass, property } = _decorator;
|
const { ccclass, property } = _decorator;
|
||||||
|
|
||||||
/** 视图层对象 */
|
/** 视图层对象 */
|
||||||
@@ -129,7 +128,7 @@ export class MissionHeroCompComp extends CCComp {
|
|||||||
|
|
||||||
get_info_and_remove(fight_pos:number,uuid:number){
|
get_info_and_remove(fight_pos:number,uuid:number){
|
||||||
let info:any={ap:0,hp:0,lv:1,crit:0,crit_d:0,dod:0,dod_no:false,crit_no:false}
|
let info:any={ap:0,hp:0,lv:1,crit:0,crit_d:0,dod:0,dod_no:false,crit_no:false}
|
||||||
let heros=ecs.query(ecs.allOf(FriendModelComp))
|
let heros=ecs.query(ecs.allOf(HeroModelComp))
|
||||||
if(heros.length>0){
|
if(heros.length>0){
|
||||||
let hero = heros[0]
|
let hero = heros[0]
|
||||||
let hv = hero.get(HeroViewComp)
|
let hv = hero.get(HeroViewComp)
|
||||||
|
|||||||
@@ -1,20 +0,0 @@
|
|||||||
import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
|
|
||||||
|
|
||||||
/** Reward 模块 */
|
|
||||||
@ecs.register(`Reward`)
|
|
||||||
export class Reward extends ecs.Entity {
|
|
||||||
|
|
||||||
/** 实始添加的数据层组件 */
|
|
||||||
protected init() {
|
|
||||||
// this.addComponents<ecs.Comp>();
|
|
||||||
}
|
|
||||||
|
|
||||||
load() {
|
|
||||||
// this.loadData(data);
|
|
||||||
}
|
|
||||||
/** 模块资源释放 */
|
|
||||||
destroy() {
|
|
||||||
// 注: 自定义释放逻辑,视图层实现 ecs.IComp 接口的 ecs 组件需要手动释放
|
|
||||||
super.destroy();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
{
|
|
||||||
"ver": "4.0.23",
|
|
||||||
"importer": "typescript",
|
|
||||||
"imported": true,
|
|
||||||
"uuid": "e1ec0b04-8288-4c12-a6ef-ee8ebb9a3282",
|
|
||||||
"files": [],
|
|
||||||
"subMetas": {},
|
|
||||||
"userData": {}
|
|
||||||
}
|
|
||||||
@@ -1,67 +0,0 @@
|
|||||||
import { _decorator, instantiate, Label, Prefab, resources, Sprite, SpriteAtlas } 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 { oops } from "../../../../extensions/oops-plugin-framework/assets/core/Oops";
|
|
||||||
import { Items } from "../common/config/Items";
|
|
||||||
import { HChipComp } from "../hero/HChipComp";
|
|
||||||
import { SChipComp } from "../hero/SChipComp";
|
|
||||||
|
|
||||||
const { ccclass, property } = _decorator;
|
|
||||||
|
|
||||||
/** 视图层对象 */
|
|
||||||
@ccclass('RewardComp')
|
|
||||||
@ecs.register('RewardComp', false)
|
|
||||||
export class RewardComp extends CCComp {
|
|
||||||
i_uuid: number = 0;
|
|
||||||
x1: number = 0;
|
|
||||||
x10: number = 0;
|
|
||||||
|
|
||||||
/** 视图层逻辑代码分离演示 */
|
|
||||||
start() {
|
|
||||||
// var entity = this.ent as ecs.Entity; // ecs.Entity 可转为当前模块的具体实体对象
|
|
||||||
// this.on(ModuleEvent.Cmd, this.onHandler, this);
|
|
||||||
}
|
|
||||||
init(uuid:number,x1:number,x10:number,parent:any,type:number=0){
|
|
||||||
|
|
||||||
if(type==0){
|
|
||||||
var icon_path = "gui/items"
|
|
||||||
resources.load(icon_path, SpriteAtlas, (err: any, atlas) => {
|
|
||||||
const sprite = this.node.getChildByName("icon").getComponent(Sprite);
|
|
||||||
sprite.spriteFrame = atlas.getSpriteFrame(Items[uuid].path);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
if(type==1){
|
|
||||||
this.node.getChildByName("icon").active=false
|
|
||||||
this.node.getChildByName("hchip").active=true
|
|
||||||
let hc= this.node.getChildByName("hchip").getComponent(HChipComp)
|
|
||||||
hc.update_data(uuid,0)
|
|
||||||
}
|
|
||||||
|
|
||||||
if(type==2){
|
|
||||||
this.node.getChildByName("icon").active=false
|
|
||||||
this.node.getChildByName("schip").active=true
|
|
||||||
let sc= this.node.getChildByName("schip").getComponent(SChipComp)
|
|
||||||
sc.update_data(uuid,0)
|
|
||||||
}
|
|
||||||
|
|
||||||
this.node.getChildByName("x1").getComponent(Label).string = x1.toString()
|
|
||||||
this.node.getChildByName("x10").getComponent(Label).string = x10.toString()
|
|
||||||
this.node.parent = parent
|
|
||||||
}
|
|
||||||
protected onDestroy(): void {
|
|
||||||
console.log("释放奖励界面");
|
|
||||||
}
|
|
||||||
/** 全局消息逻辑处理 */
|
|
||||||
// private onHandler(event: string, args: any) {
|
|
||||||
// switch (event) {
|
|
||||||
// case ModuleEvent.Cmd:
|
|
||||||
// break;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
/** 视图对象通过 ecs.Entity.remove(ModuleViewComp) 删除组件是触发组件处理自定义释放逻辑 */
|
|
||||||
reset() {
|
|
||||||
this.node.destroy();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
{
|
|
||||||
"ver": "4.0.23",
|
|
||||||
"importer": "typescript",
|
|
||||||
"imported": true,
|
|
||||||
"uuid": "0d093357-3eb4-48e9-812e-3c4ab37a36c9",
|
|
||||||
"files": [],
|
|
||||||
"subMetas": {},
|
|
||||||
"userData": {}
|
|
||||||
}
|
|
||||||
@@ -1,218 +0,0 @@
|
|||||||
import { _decorator, Component, Label, Node, resources, Sprite, SpriteAtlas, tween, v3 } from 'cc';
|
|
||||||
import { oops } from 'db://oops-framework/core/Oops';
|
|
||||||
import { GameEvent } from '../common/config/GameEvent';
|
|
||||||
import { smc } from '../common/SingletonModuleComp';
|
|
||||||
import { EquipInfo, EquipType, EquipAttrTarget, EquipSpecialAttr} from '../common/config/Equips';
|
|
||||||
import { BuffAttr, DebuffAttr, geDebuffNum, getBuffNum } from '../common/config/SkillSet';
|
|
||||||
import { FightSet } from '../common/config/Mission';
|
|
||||||
import { Quality } from '../common/config/CardSet';
|
|
||||||
import { TalentList, TalentSlot } from '../common/config/TalentSet';
|
|
||||||
const { ccclass, property } = _decorator;
|
|
||||||
|
|
||||||
@ccclass('TalsComp')
|
|
||||||
export class TalsComp extends Component {
|
|
||||||
tal1:any=null
|
|
||||||
tal2:any=null
|
|
||||||
tal3:any=null
|
|
||||||
tal4:any=null
|
|
||||||
tal5:any=null
|
|
||||||
tal6:any=null
|
|
||||||
boxs:Node=null
|
|
||||||
cur_tal:string=""
|
|
||||||
// attrs:any={
|
|
||||||
// hero_buff:getBuffNum(),
|
|
||||||
// enemy_buff:getBuffNum(),
|
|
||||||
// }
|
|
||||||
/** 视图层逻辑代码分离演示 */
|
|
||||||
onLoad() {
|
|
||||||
oops.message.on(GameEvent.FightReady,this.fight_ready,this)
|
|
||||||
oops.message.on(GameEvent.UseTalentCard,this.tal_add,this)
|
|
||||||
this.boxs=this.node.getChildByName("boxs")
|
|
||||||
}
|
|
||||||
|
|
||||||
start(){
|
|
||||||
this.fight_ready()
|
|
||||||
}
|
|
||||||
|
|
||||||
fight_ready(){
|
|
||||||
this.boxs.getChildByName("tal1").getChildByName("icon").active=false
|
|
||||||
this.boxs.getChildByName("tal2").getChildByName("icon").active=false
|
|
||||||
this.boxs.getChildByName("tal3").getChildByName("icon").active=false
|
|
||||||
this.boxs.getChildByName("tal4").getChildByName("icon").active=false
|
|
||||||
// this.boxs.getChildByName("tal5").getChildByName("icon").active=false
|
|
||||||
// this.boxs.getChildByName("tal6").getChildByName("icon").active=false
|
|
||||||
this.boxs.getChildByName("tal1").getChildByName("light").active=false
|
|
||||||
this.boxs.getChildByName("tal2").getChildByName("light").active=false
|
|
||||||
this.boxs.getChildByName("tal3").getChildByName("light").active=false
|
|
||||||
this.boxs.getChildByName("tal4").getChildByName("light").active=false
|
|
||||||
// this.boxs.getChildByName("tal5").getChildByName("light").active=false
|
|
||||||
// this.boxs.getChildByName("tal6").getChildByName("light").active=false
|
|
||||||
this.reset_attrs()
|
|
||||||
}
|
|
||||||
tal_add(e:GameEvent,data:any){
|
|
||||||
console.log("[TalsComp]:tal_add",data)
|
|
||||||
switch(data.slot){
|
|
||||||
case TalentSlot[0]:
|
|
||||||
if(this.tal1.uuid!=0) {
|
|
||||||
oops.message.dispatchEvent(GameEvent.RemoveTalent,{uuid:this.tal1.uuid})
|
|
||||||
}
|
|
||||||
this.tal1.uuid=data.uuid
|
|
||||||
this.tal1.name=data.name
|
|
||||||
this.show_tal(data.uuid,TalentSlot[0])
|
|
||||||
break
|
|
||||||
case TalentSlot[1]:
|
|
||||||
if(this.tal2.uuid!=0) {
|
|
||||||
oops.message.dispatchEvent(GameEvent.RemoveTalent,{uuid:this.tal2.uuid})
|
|
||||||
}
|
|
||||||
this.tal2.uuid=data.uuid
|
|
||||||
this.tal2.name=data.name
|
|
||||||
this.show_tal(data.uuid,TalentSlot[1])
|
|
||||||
break
|
|
||||||
case TalentSlot[2]:
|
|
||||||
if(this.tal3.uuid!=0) {
|
|
||||||
oops.message.dispatchEvent(GameEvent.RemoveTalent,{uuid:this.tal3.uuid})
|
|
||||||
}
|
|
||||||
this.tal3.uuid=data.uuid
|
|
||||||
this.tal3.name=data.name
|
|
||||||
this.show_tal(data.uuid,TalentSlot[2])
|
|
||||||
break
|
|
||||||
case TalentSlot[3]:
|
|
||||||
if(this.tal4.uuid!=0) {
|
|
||||||
oops.message.dispatchEvent(GameEvent.RemoveTalent,{uuid:this.tal4.uuid})
|
|
||||||
}
|
|
||||||
this.tal4.uuid=data.uuid
|
|
||||||
this.tal4.name=data.name
|
|
||||||
this.show_tal(data.uuid,TalentSlot[3])
|
|
||||||
break
|
|
||||||
case TalentSlot[4]:
|
|
||||||
if(this.tal5.uuid!=0) {
|
|
||||||
oops.message.dispatchEvent(GameEvent.RemoveTalent,{uuid:this.tal5.uuid})
|
|
||||||
}
|
|
||||||
this.tal5.uuid=data.uuid
|
|
||||||
this.tal5.name=data.name
|
|
||||||
this.show_tal(data.uuid,TalentSlot[4])
|
|
||||||
break
|
|
||||||
case TalentSlot[5]:
|
|
||||||
if(this.tal6.uuid!=0) {
|
|
||||||
oops.message.dispatchEvent(GameEvent.RemoveTalent,{uuid:this.tal6.uuid})
|
|
||||||
}
|
|
||||||
this.tal6.uuid=data.uuid
|
|
||||||
this.tal6.name=data.name
|
|
||||||
this.show_tal(data.uuid,TalentSlot[5])
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
|
||||||
show_tal(uuid:number,slot:string="tal1"){
|
|
||||||
let icon = this.boxs.getChildByName(slot).getChildByName("icon")
|
|
||||||
icon.active=true
|
|
||||||
var icon_path = "game/heros/cards"
|
|
||||||
resources.load(icon_path, SpriteAtlas, (err: any, atlas) => {
|
|
||||||
const sprite = icon.getChildByName("icon").getComponent(Sprite);
|
|
||||||
sprite.spriteFrame = atlas.getSpriteFrame(TalentList[uuid].path);
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
|
||||||
to_change_tal(){
|
|
||||||
if(smc.vmdata.mission_data.refresh_count<=0) return
|
|
||||||
smc.vmdata.mission_data.refresh_count--
|
|
||||||
console.log("[TalsComp]:to_change_tal")
|
|
||||||
if(this.cur_tal=="") return
|
|
||||||
oops.message.dispatchEvent(GameEvent.TalentSelect,{slot:this.cur_tal})
|
|
||||||
this.close_tal_info()
|
|
||||||
}
|
|
||||||
close_tal_info(){
|
|
||||||
console.log("[TalsComp]:close_tal_info")
|
|
||||||
let node= this.node.getChildByName("info")
|
|
||||||
tween(node).to(0.1,{position:v3(-1000,node.position.y,0)}).start()
|
|
||||||
this.cur_tal=""
|
|
||||||
}
|
|
||||||
show_tal_info(e:any,data:any){
|
|
||||||
console.log("[TalsComp]:show_tal_info",e,data)
|
|
||||||
let uuid=0
|
|
||||||
switch(data){
|
|
||||||
case TalentSlot[0]:
|
|
||||||
if(this.tal1.uuid==0) return
|
|
||||||
uuid=this.tal1.uuid
|
|
||||||
this.cur_tal=TalentSlot[0]
|
|
||||||
break
|
|
||||||
case TalentSlot[1]:
|
|
||||||
if(this.tal2.uuid==0) return
|
|
||||||
uuid=this.tal2.uuid
|
|
||||||
this.cur_tal=TalentSlot[1]
|
|
||||||
break
|
|
||||||
case TalentSlot[2]:
|
|
||||||
if(this.tal3.uuid==0) return
|
|
||||||
uuid=this.tal3.uuid
|
|
||||||
this.cur_tal=TalentSlot[2]
|
|
||||||
break
|
|
||||||
case TalentSlot[3]:
|
|
||||||
if(this.tal4.uuid==0) return
|
|
||||||
uuid=this.tal4.uuid
|
|
||||||
this.cur_tal=TalentSlot[3]
|
|
||||||
break
|
|
||||||
case TalentSlot[4]:
|
|
||||||
if(this.tal5.uuid==0) return
|
|
||||||
uuid=this.tal5.uuid
|
|
||||||
this.cur_tal=TalentSlot[4]
|
|
||||||
break
|
|
||||||
case TalentSlot[5]:
|
|
||||||
if(this.tal6.uuid==0) return
|
|
||||||
uuid=this.tal6.uuid
|
|
||||||
this.cur_tal=TalentSlot[5]
|
|
||||||
break
|
|
||||||
}
|
|
||||||
let node= this.node.getChildByName("info")
|
|
||||||
var icon_path = "game/heros/cards"
|
|
||||||
resources.load(icon_path, SpriteAtlas, (err: any, atlas) => {
|
|
||||||
const sprite = node.getChildByName("tal").getComponent(Sprite);
|
|
||||||
sprite.spriteFrame = atlas.getSpriteFrame(TalentList[uuid].path);
|
|
||||||
});
|
|
||||||
node.getChildByName("info").getComponent(Label).string=TalentList[uuid].info
|
|
||||||
tween(node).to(0.1,{position:v3(0,node.position.y,0)}).start()
|
|
||||||
}
|
|
||||||
// 重置所有属性为0
|
|
||||||
private reset_attrs() {
|
|
||||||
this.tal1={
|
|
||||||
uuid:0,
|
|
||||||
name:"tal1",
|
|
||||||
slot:TalentSlot[0],
|
|
||||||
}
|
|
||||||
this.tal2={
|
|
||||||
uuid:0,
|
|
||||||
name:"tal2",
|
|
||||||
slot:TalentSlot[1],
|
|
||||||
}
|
|
||||||
this.tal3={
|
|
||||||
uuid:0,
|
|
||||||
name:"tal3",
|
|
||||||
slot:TalentSlot[2],
|
|
||||||
}
|
|
||||||
this.tal4={
|
|
||||||
uuid:0,
|
|
||||||
name:"tal4",
|
|
||||||
slot:TalentSlot[3],
|
|
||||||
}
|
|
||||||
this.tal5={
|
|
||||||
uuid:0,
|
|
||||||
name:"tal5",
|
|
||||||
slot:TalentSlot[4],
|
|
||||||
}
|
|
||||||
this.tal6={
|
|
||||||
uuid:0,
|
|
||||||
name:"tal6",
|
|
||||||
slot:TalentSlot[5],
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
update(dt: number): void {
|
|
||||||
if(!smc.mission.play||smc.mission.pause) return
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
{"ver":"4.0.23","importer":"typescript","imported":true,"uuid":"da5d321d-c73e-40d4-beac-6f5141ef0ac3","files":[],"subMetas":{},"userData":{}}
|
|
||||||
Reference in New Issue
Block a user