技能继续
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -1,702 +0,0 @@
|
||||
[
|
||||
{
|
||||
"__type__": "cc.Prefab",
|
||||
"_name": "mskill",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_native": "",
|
||||
"data": {
|
||||
"__id__": 1
|
||||
},
|
||||
"optimizationPolicy": 0,
|
||||
"persistent": false
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "mskill",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_parent": null,
|
||||
"_children": [
|
||||
{
|
||||
"__id__": 2
|
||||
},
|
||||
{
|
||||
"__id__": 8
|
||||
},
|
||||
{
|
||||
"__id__": 14
|
||||
},
|
||||
{
|
||||
"__id__": 20
|
||||
}
|
||||
],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 24
|
||||
},
|
||||
{
|
||||
"__id__": 26
|
||||
},
|
||||
{
|
||||
"__id__": 28
|
||||
},
|
||||
{
|
||||
"__id__": 30
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 32
|
||||
},
|
||||
"_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": "Button_SkillBtn_Orange",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_parent": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 3
|
||||
},
|
||||
{
|
||||
"__id__": 5
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 7
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"_lrot": {
|
||||
"__type__": "cc.Quat",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0,
|
||||
"w": 1
|
||||
},
|
||||
"_lscale": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 1,
|
||||
"y": 1,
|
||||
"z": 1
|
||||
},
|
||||
"_mobility": 0,
|
||||
"_layer": 1073741824,
|
||||
"_euler": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.UITransform",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 2
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 4
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 80,
|
||||
"height": 80
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5,
|
||||
"y": 0.5
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "bauY7hXINFZrhPl6edHIl2"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Sprite",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 2
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 6
|
||||
},
|
||||
"_customMaterial": null,
|
||||
"_srcBlendFactor": 2,
|
||||
"_dstBlendFactor": 4,
|
||||
"_color": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 255,
|
||||
"g": 255,
|
||||
"b": 255,
|
||||
"a": 255
|
||||
},
|
||||
"_spriteFrame": {
|
||||
"__uuid__": "f87f53f9-2fba-4a5b-968a-79a593311ab2@f37b3",
|
||||
"__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": "462hZnCkNO97yqyBF8vbaN"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 1
|
||||
},
|
||||
"asset": {
|
||||
"__id__": 0
|
||||
},
|
||||
"fileId": "fdCiFhP+xGc5Zyr+DMxELc",
|
||||
"instance": null,
|
||||
"targetOverrides": null,
|
||||
"nestedPrefabInstanceRoots": null
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "icon",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_parent": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 9
|
||||
},
|
||||
{
|
||||
"__id__": 11
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 13
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"_lrot": {
|
||||
"__type__": "cc.Quat",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0,
|
||||
"w": 1
|
||||
},
|
||||
"_lscale": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 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__": 8
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 10
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 65,
|
||||
"height": 65
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5,
|
||||
"y": 0.5
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "7aXcN081JI2alKGYRKpfpV"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Sprite",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 8
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 12
|
||||
},
|
||||
"_customMaterial": null,
|
||||
"_srcBlendFactor": 2,
|
||||
"_dstBlendFactor": 4,
|
||||
"_color": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 255,
|
||||
"g": 255,
|
||||
"b": 255,
|
||||
"a": 255
|
||||
},
|
||||
"_spriteFrame": {
|
||||
"__uuid__": "767c21dd-b2a2-4118-a12d-f67a8039abd4@b3f5a",
|
||||
"__expectedType__": "cc.SpriteFrame"
|
||||
},
|
||||
"_type": 0,
|
||||
"_fillType": 0,
|
||||
"_sizeMode": 0,
|
||||
"_fillCenter": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"_fillStart": 0,
|
||||
"_fillRange": 0,
|
||||
"_isTrimmedMode": true,
|
||||
"_useGrayscale": false,
|
||||
"_atlas": null,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "9cs0MQwGRJl4svNJK/f2/x"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 1
|
||||
},
|
||||
"asset": {
|
||||
"__id__": 0
|
||||
},
|
||||
"fileId": "a0hwtaZtFLSrxUJFKE6ij0",
|
||||
"instance": null,
|
||||
"targetOverrides": null,
|
||||
"nestedPrefabInstanceRoots": null
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "cd",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_parent": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 15
|
||||
},
|
||||
{
|
||||
"__id__": 17
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 19
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"_lrot": {
|
||||
"__type__": "cc.Quat",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0.7071067811865475,
|
||||
"w": 0.7071067811865476
|
||||
},
|
||||
"_lscale": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 1,
|
||||
"y": 1,
|
||||
"z": 1
|
||||
},
|
||||
"_mobility": 0,
|
||||
"_layer": 1073741824,
|
||||
"_euler": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 90
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.UITransform",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 14
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 16
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 80,
|
||||
"height": 80
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5,
|
||||
"y": 0.5
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "29HRVP3rlJjJN03KS/Qaj3"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Sprite",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 14
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 18
|
||||
},
|
||||
"_customMaterial": null,
|
||||
"_srcBlendFactor": 2,
|
||||
"_dstBlendFactor": 4,
|
||||
"_color": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 255,
|
||||
"g": 255,
|
||||
"b": 255,
|
||||
"a": 105
|
||||
},
|
||||
"_spriteFrame": {
|
||||
"__uuid__": "f87f53f9-2fba-4a5b-968a-79a593311ab2@cec89",
|
||||
"__expectedType__": "cc.SpriteFrame"
|
||||
},
|
||||
"_type": 3,
|
||||
"_fillType": 2,
|
||||
"_sizeMode": 0,
|
||||
"_fillCenter": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5,
|
||||
"y": 0.5
|
||||
},
|
||||
"_fillStart": 0,
|
||||
"_fillRange": 1,
|
||||
"_isTrimmedMode": true,
|
||||
"_useGrayscale": true,
|
||||
"_atlas": null,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "93Ul1oQ+xIiZpg+gxedB+D"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 1
|
||||
},
|
||||
"asset": {
|
||||
"__id__": 0
|
||||
},
|
||||
"fileId": "75g2fW6exDe5hMWN7UMZ33",
|
||||
"instance": null,
|
||||
"targetOverrides": null,
|
||||
"nestedPrefabInstanceRoots": null
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "lv",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_parent": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 21
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 23
|
||||
},
|
||||
"_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__": 20
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 22
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 100,
|
||||
"height": 100
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5,
|
||||
"y": 0.5
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "5fUE+L6pFFGpUP6VIa0UGx"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 1
|
||||
},
|
||||
"asset": {
|
||||
"__id__": 0
|
||||
},
|
||||
"fileId": "b7JHHjwwtJr6ANHSR3jgj7",
|
||||
"instance": null,
|
||||
"targetOverrides": null,
|
||||
"nestedPrefabInstanceRoots": null
|
||||
},
|
||||
{
|
||||
"__type__": "cc.UITransform",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 25
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 90,
|
||||
"height": 90
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5,
|
||||
"y": 0.5
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "84Ard7qDdFL7OPr15j/5zB"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Sprite",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 27
|
||||
},
|
||||
"_customMaterial": null,
|
||||
"_srcBlendFactor": 2,
|
||||
"_dstBlendFactor": 4,
|
||||
"_color": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 250,
|
||||
"g": 0,
|
||||
"b": 0,
|
||||
"a": 255
|
||||
},
|
||||
"_spriteFrame": null,
|
||||
"_type": 1,
|
||||
"_fillType": 0,
|
||||
"_sizeMode": 0,
|
||||
"_fillCenter": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"_fillStart": 0,
|
||||
"_fillRange": 0,
|
||||
"_isTrimmedMode": true,
|
||||
"_useGrayscale": true,
|
||||
"_atlas": null,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "acXHR6iZtAP7pxuZwEfHv8"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.ProgressBar",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 29
|
||||
},
|
||||
"_barSprite": {
|
||||
"__id__": 17
|
||||
},
|
||||
"_mode": 2,
|
||||
"_totalLength": 1,
|
||||
"_progress": 1,
|
||||
"_reverse": false,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "a8E/M8cZNMh7zmcVGsBXx9"
|
||||
},
|
||||
{
|
||||
"__type__": "87082d0X2RDEq1y6hJbSlgm",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 31
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "26mc6tdD1FK4ibdzSJrtik"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 1
|
||||
},
|
||||
"asset": {
|
||||
"__id__": 0
|
||||
},
|
||||
"fileId": "75xfkWpURP0b3lC6f/G9hT",
|
||||
"instance": null,
|
||||
"targetOverrides": null
|
||||
}
|
||||
]
|
||||
@@ -1,13 +0,0 @@
|
||||
{
|
||||
"ver": "1.1.50",
|
||||
"importer": "prefab",
|
||||
"imported": true,
|
||||
"uuid": "9ebd334d-ddc9-4c34-8997-bb10152b1061",
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {},
|
||||
"userData": {
|
||||
"syncNodeName": "mskill"
|
||||
}
|
||||
}
|
||||
@@ -66,11 +66,7 @@ export const SkillSet={
|
||||
|
||||
}
|
||||
|
||||
export const MSkills={
|
||||
1101:{uuid:1101,path:"1001",name: "火球术",info:"释放一个火球术攻击敌人",type:1,for_type:false,shoot:true,buff:false,tg:3,up_exp:10,ssk:1001,
|
||||
ap:20,ap_up:1,cd:1},
|
||||
}
|
||||
export const MSk_list = [1101,]
|
||||
export const MSklist = [1101,1002]
|
||||
export const MSkillset={
|
||||
confirm_exp:10,
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/modu
|
||||
import { smc } from "../common/SingletonModuleComp";
|
||||
import { oops } from "../../../../extensions/oops-plugin-framework/assets/core/Oops";
|
||||
import { RandomManager } from "../../../../extensions/oops-plugin-framework/assets/core/common/random/RandomManager";
|
||||
import { MSkills, MSkillset, MSlist, SkillSet } from "../common/config/SkillSet";
|
||||
import { MSkillset, MSlist, SkillSet } from "../common/config/SkillSet";
|
||||
import { HeroModelComp } from "../hero/HeroModelComp";
|
||||
import { RewardSet } from "../common/config/RewardSet";
|
||||
import { BoxSet, GameSet } from "../common/config/BoxSet";
|
||||
@@ -22,8 +22,6 @@ import { BossList, MBSet, MissionNum, MissionSet, MonsetList } from "../common/c
|
||||
import { Timer } from "../../../../extensions/oops-plugin-framework/assets/core/common/timer/Timer";
|
||||
import { HCard } from "./HCard";
|
||||
import { HCardComp } from "./HCardComp";
|
||||
import { MSkill } from "../skills/MSkill";
|
||||
import { MSkillComp } from "../skills/MSkillComp";
|
||||
import { VictoryComp } from "./VictoryComp";
|
||||
import { ItemComp } from "./ItemComp";
|
||||
const { ccclass, property } = _decorator;
|
||||
@@ -111,12 +109,7 @@ export class MissionComp extends CCComp {
|
||||
let heros:any= this.get_heros();;
|
||||
let monsters:any= this.get_mons();
|
||||
let hcards:any= ecs.query(ecs.allOf(HCardComp));
|
||||
let mska:any= ecs.query(ecs.allOf(MSkillComp));
|
||||
let res:any= ecs.query(ecs.allOf(ItemComp));
|
||||
for(let i=0;i<mska.length;i++){
|
||||
mska[i].MSkillComp.reset()
|
||||
mska[i].MSkillComp.ent.destroy()
|
||||
}
|
||||
let rewards:any= ecs.query(ecs.allOf(ItemComp));
|
||||
// let hcns=this.node.getChildByName("hcards")
|
||||
// for(let i=0;i<hcns.children.length;i++){
|
||||
// hcns.children[i].destroy()
|
||||
@@ -133,9 +126,9 @@ export class MissionComp extends CCComp {
|
||||
monsters[i].HeroView.reset()
|
||||
monsters[i].HeroView.ent.destroy()
|
||||
}
|
||||
for(let i=0;i<res.length;i++){
|
||||
res[i].ItemComp.reset()
|
||||
res[i].ItemComp.ent.destroy()
|
||||
for(let i=0;i<rewards.length;i++){
|
||||
rewards[i].ItemComp.reset()
|
||||
rewards[i].ItemComp.ent.destroy()
|
||||
}
|
||||
}
|
||||
check_buff(){
|
||||
|
||||
@@ -13,7 +13,7 @@ export class MSCard extends ecs.Entity {
|
||||
protected init() {
|
||||
// this.addComponents<ecs.Comp>();
|
||||
}
|
||||
load(uuid:number=1001,parent:any) {
|
||||
load(uuid:number=1001,parent:any,zone:number=0) {
|
||||
var path = "game/gui/MSCard";
|
||||
// var icon_path = "game/heros/herois"
|
||||
// resources.load(icon_path, SpriteAtlas, (err: any, atlas) => {
|
||||
@@ -26,7 +26,8 @@ export class MSCard extends ecs.Entity {
|
||||
node.parent = parent
|
||||
var msc = node.getComponent(MSCardComp)!;
|
||||
msc.s_uuid= uuid
|
||||
if(smc.mskill==uuid) msc.is_selected=true
|
||||
if(zone==1) {msc.is_update=true }else{msc.is_update=false}
|
||||
if(zone==2) {msc.is_select=true}else{msc.is_select=false}
|
||||
this.add(msc)
|
||||
}
|
||||
/** 模块资源释放 */
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
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";
|
||||
import { smc } from "../common/SingletonModuleComp";
|
||||
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@@ -9,19 +10,30 @@ const { ccclass, property } = _decorator;
|
||||
@ecs.register('MSCardComp', false)
|
||||
export class MSCardComp extends CCComp {
|
||||
s_uuid: number = 0;
|
||||
is_updated: boolean = false;
|
||||
is_update: boolean = false;
|
||||
is_select: boolean = false;
|
||||
is_selected: boolean = false;
|
||||
/** 视图层逻辑代码分离演示 */
|
||||
start() {
|
||||
console.log("MSCardComp start");
|
||||
if(this.is_updated){ this.node.getChildByName("update").active=true }else{ this.node.getChildByName("update").active=false }
|
||||
if(this.is_select){ this.node.getChildByName("select").active=true }else{ this.node.getChildByName("select").active=false }
|
||||
if(this.is_selected){ this.node.getChildByName("selected").active=true }else{ this.node.getChildByName("selected").active=false }
|
||||
|
||||
if(this.is_update){
|
||||
this.node.getChildByName("update").active=true
|
||||
}else{
|
||||
this.node.getChildByName("update").active=false
|
||||
}
|
||||
if(this.is_select){
|
||||
this.node.getChildByName("set").active=true
|
||||
this.update_select()
|
||||
}else{
|
||||
this.node.getChildByName("set").active=false
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
update_select(){
|
||||
if(smc.mskill ==this.s_uuid){ this.node.getChildByName("btn").active=false }else{ this.node.getChildByName("btn").active=true }
|
||||
}
|
||||
|
||||
/** 视图对象通过 ecs.Entity.remove(ModuleViewComp) 删除组件是触发组件处理自定义释放逻辑 */
|
||||
reset() {
|
||||
|
||||
@@ -7,6 +7,8 @@ import { UiHeroComp } from "../hero/UiHeroComp";
|
||||
import { BoxSet } from "../common/config/BoxSet";
|
||||
import { smc } from "../common/SingletonModuleComp";
|
||||
import { HeroSelect } from "../hero/HeroSelect";
|
||||
import { MSklist } from "../common/config/SkillSet";
|
||||
import { MSCard } from "./MSCard";
|
||||
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@@ -28,7 +30,7 @@ export class MissionHomeComp extends CCComp {
|
||||
start() {
|
||||
// var entity = this.ent as ecs.Entity; // ecs.Entity 可转为当前模块的具体实体对象
|
||||
// this.on(ModuleEvent.Cmd, this.onHandler, this);
|
||||
this.loads()
|
||||
this.load_hero_card()
|
||||
this.load_ui_heros()
|
||||
}
|
||||
|
||||
@@ -92,7 +94,7 @@ export class MissionHomeComp extends CCComp {
|
||||
}
|
||||
}
|
||||
}
|
||||
loads(){
|
||||
load_hero_card(){
|
||||
let hc:number =HeroList.length
|
||||
let parent= this.node.getChildByName("heros").getChildByName("view").getChildByName("content")
|
||||
let height=Math.ceil(hc / 4)*135
|
||||
@@ -102,6 +104,16 @@ export class MissionHomeComp extends CCComp {
|
||||
hcc.load(HeroList[i],parent)
|
||||
}
|
||||
}
|
||||
load_skill_card(){
|
||||
let ms_num:number =MSklist.length
|
||||
let parent= this.node.getChildByName("skills").getChildByName("view").getChildByName("content")
|
||||
let height=ms_num*135
|
||||
parent.getComponent(UITransform).width=height
|
||||
for (let i = 0; i < ms_num; i++) {
|
||||
let msc =ecs.getEntity<MSCard>(MSCard)
|
||||
msc.load(HeroList[i],parent,1)
|
||||
}
|
||||
}
|
||||
show_uiheros(){
|
||||
|
||||
}
|
||||
|
||||
@@ -1,40 +0,0 @@
|
||||
import { instantiate, Prefab, v3 } from "cc";
|
||||
import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
|
||||
import { oops } from "../../../../extensions/oops-plugin-framework/assets/core/Oops";
|
||||
import { MSkillComp } from "./MSkillComp";
|
||||
import { smc } from "../common/SingletonModuleComp";
|
||||
import { BoxSet } from "../common/config/BoxSet";
|
||||
|
||||
/** MSkill 模块 */
|
||||
@ecs.register(`MSkill`)
|
||||
export class MSkill extends ecs.Entity {
|
||||
|
||||
|
||||
/** 实始添加的数据层组件 */
|
||||
protected init() {
|
||||
// this.addComponents<ecs.Comp>();
|
||||
}
|
||||
load(box_group:number=0,uuid:number=1001) {
|
||||
var path = "game/heros/mskill";
|
||||
var prefab: Prefab = oops.res.get(path, Prefab)!;
|
||||
var node = instantiate(prefab);
|
||||
let entityLayer =smc.map.MapView.scene.entityLayer!.node!
|
||||
node.parent = entityLayer
|
||||
let pos=v3(-300,245)
|
||||
if(box_group==BoxSet.MONSTER){
|
||||
pos.x=300
|
||||
// node.setScale(-1,1)
|
||||
}
|
||||
node.setPosition(pos)
|
||||
var msc = node.getComponent(MSkillComp)!;
|
||||
msc.msk_uuid = uuid
|
||||
msc.box_group = box_group
|
||||
this.add(msc)
|
||||
}
|
||||
/** 模块资源释放 */
|
||||
destroy() {
|
||||
// 注: 自定义释放逻辑,视图层实现 ecs.IComp 接口的 ecs 组件需要手动释放
|
||||
super.destroy();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
{
|
||||
"ver": "4.0.23",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "10489fd2-88db-4945-a7b2-b9f26aaceab2",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
||||
@@ -1,99 +0,0 @@
|
||||
import { _decorator, ProgressBar, UITransform, v3, Vec3 } from "cc";
|
||||
import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
|
||||
import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/module/common/CCComp";
|
||||
import { MSkills } from "../common/config/SkillSet";
|
||||
import { Skill } from "./Skill";
|
||||
import { BoxSet } from "../common/config/BoxSet";
|
||||
import { smc } from "../common/SingletonModuleComp";
|
||||
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
/** 视图层对象 */
|
||||
@ccclass('MSkillComp')
|
||||
@ecs.register('MSkillComp', false)
|
||||
export class MSkillComp extends CCComp {
|
||||
msk_uuid: number = 0;
|
||||
ap: number = 0;
|
||||
cd: number = 0;
|
||||
cdt: number = 0;
|
||||
lv: number = 0;
|
||||
skill:any=null
|
||||
box_group:number=0
|
||||
|
||||
/** 视图层逻辑代码分离演示 */
|
||||
start() {
|
||||
this.skill=MSkills[this.msk_uuid]
|
||||
this.ap=this.skill.ap
|
||||
this.cd=this.cdt=this.skill.cd
|
||||
}
|
||||
protected update(dt: number): void {
|
||||
if(!smc.vmdata.mission.play||smc.vmdata.mission.pause){
|
||||
return
|
||||
}
|
||||
this.check_cd(dt)
|
||||
}
|
||||
check_cd(dt:number){
|
||||
this.cdt-=dt
|
||||
this.node.getComponent(ProgressBar).progress=this.cdt/this.cd
|
||||
if(this.cdt<=0){
|
||||
this.cdt=this.cd
|
||||
if(this.skill.shoot){
|
||||
this.shoot_enemy()
|
||||
}else if(this.skill.buff){
|
||||
this.add_buff()
|
||||
}else{
|
||||
this.to_mission()
|
||||
}
|
||||
}
|
||||
}
|
||||
to_mission(){
|
||||
//特殊技能,如 增加一次免死, 复活等
|
||||
}
|
||||
add_buff(){
|
||||
//buff 技能,如 加血 加攻 加生命值最大值
|
||||
}
|
||||
shoot_enemy(){
|
||||
let skill = ecs.getEntity<Skill>(Skill);
|
||||
let {pos,t_pos}=this.get_enemy_pos()
|
||||
pos.y=pos.y
|
||||
pos.x=pos.x
|
||||
skill.load(pos,this.box_group,this.node,this.skill.ssk,this.ap,t_pos,false,0);
|
||||
console.log("mskill 使用技能:"+this.skill.ssk);
|
||||
}
|
||||
get_enemy_pos(){
|
||||
let pos =v3(0,0)
|
||||
let t_pos:Vec3 = v3(0,0)
|
||||
let dir = 720
|
||||
let enemy = v3(720,BoxSet.GAME_LINE)
|
||||
if(this.box_group == BoxSet.MONSTER){
|
||||
let t_pos:Vec3 = v3(-720,0)
|
||||
for (let i = 0; i < smc.hero_pos.length; i++) {
|
||||
let ho:any = smc.hero_pos[i];
|
||||
let x=Math.abs(ho.x-this.node.position.x)
|
||||
if(x < dir){
|
||||
dir = x
|
||||
enemy = ho
|
||||
}
|
||||
}
|
||||
}
|
||||
if(this.box_group == BoxSet.HERO){
|
||||
let t_pos:Vec3 = v3(720,0)
|
||||
for (let i = 0; i < smc.enemy_pos.length; i++) {
|
||||
let mon:any = smc.enemy_pos[i];
|
||||
let x=Math.abs(mon.x-this.node.position.x)
|
||||
if(x < dir){
|
||||
dir = x
|
||||
enemy = mon
|
||||
}
|
||||
}
|
||||
}
|
||||
t_pos = v3(enemy.x-this.node.position.x,enemy.y-this.node.position.y)
|
||||
return {pos,t_pos}
|
||||
}
|
||||
/** 全局消息逻辑处理 */
|
||||
|
||||
/** 视图对象通过 ecs.Entity.remove(ModuleViewComp) 删除组件是触发组件处理自定义释放逻辑 */
|
||||
reset() {
|
||||
this.node.destroy();
|
||||
}
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
{
|
||||
"ver": "4.0.23",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "87082774-5f64-4312-ad72-ea125b4a5826",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
||||
Reference in New Issue
Block a user