技能layer改变,位置信息修改

This commit is contained in:
2025-01-07 07:54:29 +08:00
parent a9a7f076f4
commit ca5adce589
16 changed files with 75 additions and 536 deletions

View File

@@ -47,37 +47,31 @@
}, },
{ {
"__id__": 87 "__id__": 87
},
{
"__id__": 95
},
{
"__id__": 103
} }
], ],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 111 "__id__": 95
}, },
{ {
"__id__": 113 "__id__": 97
}, },
{ {
"__id__": 115 "__id__": 99
}, },
{ {
"__id__": 117 "__id__": 101
}, },
{ {
"__id__": 119 "__id__": 103
}, },
{ {
"__id__": 121 "__id__": 105
} }
], ],
"_prefab": { "_prefab": {
"__id__": 123 "__id__": 107
}, },
"_lpos": { "_lpos": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
@@ -1495,230 +1489,6 @@
"z": 0 "z": 0
} }
}, },
{
"__type__": "cc.Node",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_prefab": {
"__id__": 96
},
"__editorExtras__": {}
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 95
},
"asset": {
"__uuid__": "b9f0b656-fc60-43f6-bf8b-c3efa8997408",
"__expectedType__": "cc.Prefab"
},
"fileId": "d9UYSvjCpD24d1H7HhaHEv",
"instance": {
"__id__": 97
},
"targetOverrides": null
},
{
"__type__": "cc.PrefabInstance",
"fileId": "84huy4k/VOL5ykMOpg0H5B",
"prefabRootNode": {
"__id__": 1
},
"mountedChildren": [],
"mountedComponents": [],
"propertyOverrides": [
{
"__id__": 98
},
{
"__id__": 100
},
{
"__id__": 101
},
{
"__id__": 102
}
],
"removedComponents": []
},
{
"__type__": "CCPropertyOverrideInfo",
"targetInfo": {
"__id__": 99
},
"propertyPath": [
"_name"
],
"value": "iced"
},
{
"__type__": "cc.TargetInfo",
"localID": [
"d9UYSvjCpD24d1H7HhaHEv"
]
},
{
"__type__": "CCPropertyOverrideInfo",
"targetInfo": {
"__id__": 99
},
"propertyPath": [
"_lpos"
],
"value": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
}
},
{
"__type__": "CCPropertyOverrideInfo",
"targetInfo": {
"__id__": 99
},
"propertyPath": [
"_lrot"
],
"value": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
}
},
{
"__type__": "CCPropertyOverrideInfo",
"targetInfo": {
"__id__": 99
},
"propertyPath": [
"_euler"
],
"value": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
}
},
{
"__type__": "cc.Node",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_prefab": {
"__id__": 104
},
"__editorExtras__": {}
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 103
},
"asset": {
"__uuid__": "59df223f-5afb-41e7-a006-4cef8441130d",
"__expectedType__": "cc.Prefab"
},
"fileId": "afovdb7bBEUpz+8xJHMv4X",
"instance": {
"__id__": 105
},
"targetOverrides": null
},
{
"__type__": "cc.PrefabInstance",
"fileId": "61izU9WRVJ255b6c6Hu27c",
"prefabRootNode": {
"__id__": 1
},
"mountedChildren": [],
"mountedComponents": [],
"propertyOverrides": [
{
"__id__": 106
},
{
"__id__": 108
},
{
"__id__": 109
},
{
"__id__": 110
}
],
"removedComponents": []
},
{
"__type__": "CCPropertyOverrideInfo",
"targetInfo": {
"__id__": 107
},
"propertyPath": [
"_name"
],
"value": "yun"
},
{
"__type__": "cc.TargetInfo",
"localID": [
"afovdb7bBEUpz+8xJHMv4X"
]
},
{
"__type__": "CCPropertyOverrideInfo",
"targetInfo": {
"__id__": 107
},
"propertyPath": [
"_lpos"
],
"value": {
"__type__": "cc.Vec3",
"x": 0,
"y": 87.398,
"z": 0
}
},
{
"__type__": "CCPropertyOverrideInfo",
"targetInfo": {
"__id__": 107
},
"propertyPath": [
"_lrot"
],
"value": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
}
},
{
"__type__": "CCPropertyOverrideInfo",
"targetInfo": {
"__id__": 107
},
"propertyPath": [
"_euler"
],
"value": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
}
},
{ {
"__type__": "cc.UITransform", "__type__": "cc.UITransform",
"_name": "", "_name": "",
@@ -1729,7 +1499,7 @@
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 112 "__id__": 96
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
@@ -1757,7 +1527,7 @@
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 114 "__id__": 98
}, },
"enabledContactListener": true, "enabledContactListener": true,
"bullet": true, "bullet": true,
@@ -1791,7 +1561,7 @@
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 116 "__id__": 100
}, },
"tag": 0, "tag": 0,
"_group": 4, "_group": 4,
@@ -1825,7 +1595,7 @@
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 118 "__id__": 102
}, },
"anm": { "anm": {
"__id__": 22 "__id__": 22
@@ -1846,7 +1616,7 @@
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 120 "__id__": 104
}, },
"_id": "" "_id": ""
}, },
@@ -1864,7 +1634,7 @@
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 122 "__id__": 106
}, },
"_id": "" "_id": ""
}, },
@@ -1884,12 +1654,6 @@
"instance": null, "instance": null,
"targetOverrides": null, "targetOverrides": null,
"nestedPrefabInstanceRoots": [ "nestedPrefabInstanceRoots": [
{
"__id__": 103
},
{
"__id__": 95
},
{ {
"__id__": 87 "__id__": 87
}, },

View File

@@ -47,37 +47,31 @@
}, },
{ {
"__id__": 87 "__id__": 87
},
{
"__id__": 95
},
{
"__id__": 103
} }
], ],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 111 "__id__": 95
}, },
{ {
"__id__": 113 "__id__": 97
}, },
{ {
"__id__": 115 "__id__": 99
}, },
{ {
"__id__": 117 "__id__": 101
}, },
{ {
"__id__": 119 "__id__": 103
}, },
{ {
"__id__": 121 "__id__": 105
} }
], ],
"_prefab": { "_prefab": {
"__id__": 123 "__id__": 107
}, },
"_lpos": { "_lpos": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
@@ -1495,230 +1489,6 @@
"z": 0 "z": 0
} }
}, },
{
"__type__": "cc.Node",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_prefab": {
"__id__": 96
},
"__editorExtras__": {}
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 95
},
"asset": {
"__uuid__": "b9f0b656-fc60-43f6-bf8b-c3efa8997408",
"__expectedType__": "cc.Prefab"
},
"fileId": "d9UYSvjCpD24d1H7HhaHEv",
"instance": {
"__id__": 97
},
"targetOverrides": null
},
{
"__type__": "cc.PrefabInstance",
"fileId": "84huy4k/VOL5ykMOpg0H5B",
"prefabRootNode": {
"__id__": 1
},
"mountedChildren": [],
"mountedComponents": [],
"propertyOverrides": [
{
"__id__": 98
},
{
"__id__": 100
},
{
"__id__": 101
},
{
"__id__": 102
}
],
"removedComponents": []
},
{
"__type__": "CCPropertyOverrideInfo",
"targetInfo": {
"__id__": 99
},
"propertyPath": [
"_name"
],
"value": "iced"
},
{
"__type__": "cc.TargetInfo",
"localID": [
"d9UYSvjCpD24d1H7HhaHEv"
]
},
{
"__type__": "CCPropertyOverrideInfo",
"targetInfo": {
"__id__": 99
},
"propertyPath": [
"_lpos"
],
"value": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
}
},
{
"__type__": "CCPropertyOverrideInfo",
"targetInfo": {
"__id__": 99
},
"propertyPath": [
"_lrot"
],
"value": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
}
},
{
"__type__": "CCPropertyOverrideInfo",
"targetInfo": {
"__id__": 99
},
"propertyPath": [
"_euler"
],
"value": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
}
},
{
"__type__": "cc.Node",
"_objFlags": 0,
"_parent": {
"__id__": 1
},
"_prefab": {
"__id__": 104
},
"__editorExtras__": {}
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 103
},
"asset": {
"__uuid__": "59df223f-5afb-41e7-a006-4cef8441130d",
"__expectedType__": "cc.Prefab"
},
"fileId": "afovdb7bBEUpz+8xJHMv4X",
"instance": {
"__id__": 105
},
"targetOverrides": null
},
{
"__type__": "cc.PrefabInstance",
"fileId": "61izU9WRVJ255b6c6Hu27c",
"prefabRootNode": {
"__id__": 1
},
"mountedChildren": [],
"mountedComponents": [],
"propertyOverrides": [
{
"__id__": 106
},
{
"__id__": 108
},
{
"__id__": 109
},
{
"__id__": 110
}
],
"removedComponents": []
},
{
"__type__": "CCPropertyOverrideInfo",
"targetInfo": {
"__id__": 107
},
"propertyPath": [
"_name"
],
"value": "yun"
},
{
"__type__": "cc.TargetInfo",
"localID": [
"afovdb7bBEUpz+8xJHMv4X"
]
},
{
"__type__": "CCPropertyOverrideInfo",
"targetInfo": {
"__id__": 107
},
"propertyPath": [
"_lpos"
],
"value": {
"__type__": "cc.Vec3",
"x": 0,
"y": 87.398,
"z": 0
}
},
{
"__type__": "CCPropertyOverrideInfo",
"targetInfo": {
"__id__": 107
},
"propertyPath": [
"_lrot"
],
"value": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
}
},
{
"__type__": "CCPropertyOverrideInfo",
"targetInfo": {
"__id__": 107
},
"propertyPath": [
"_euler"
],
"value": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
}
},
{ {
"__type__": "cc.UITransform", "__type__": "cc.UITransform",
"_name": "", "_name": "",
@@ -1729,7 +1499,7 @@
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 112 "__id__": 96
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
@@ -1757,7 +1527,7 @@
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 114 "__id__": 98
}, },
"enabledContactListener": true, "enabledContactListener": true,
"bullet": true, "bullet": true,
@@ -1791,7 +1561,7 @@
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 116 "__id__": 100
}, },
"tag": 0, "tag": 0,
"_group": 4, "_group": 4,
@@ -1825,7 +1595,7 @@
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 118 "__id__": 102
}, },
"anm": { "anm": {
"__id__": 22 "__id__": 22
@@ -1846,7 +1616,7 @@
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 120 "__id__": 104
}, },
"_id": "" "_id": ""
}, },
@@ -1864,7 +1634,7 @@
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 122 "__id__": 106
}, },
"_id": "" "_id": ""
}, },
@@ -1884,12 +1654,6 @@
"instance": null, "instance": null,
"targetOverrides": null, "targetOverrides": null,
"nestedPrefabInstanceRoots": [ "nestedPrefabInstanceRoots": [
{
"__id__": 103
},
{
"__id__": 95
},
{ {
"__id__": 87 "__id__": 87
}, },

View File

@@ -115,7 +115,7 @@
"_lscale": { "_lscale": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 1, "x": 1,
"y": 1, "y": 0.7,
"z": 1 "z": 1
}, },
"_mobility": 0, "_mobility": 0,
@@ -251,7 +251,7 @@
"_lscale": { "_lscale": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 1, "x": 1,
"y": 1, "y": 0.7,
"z": 1 "z": 1
}, },
"_mobility": 0, "_mobility": 0,

View File

@@ -12,4 +12,6 @@ export enum GameEvent {
/** 登陆成功 */ /** 登陆成功 */
LoginSuccess = "LoginSuccess", LoginSuccess = "LoginSuccess",
MSSelected = "MSSelected", MSSelected = "MSSelected",
MissionStart = "MissionStart",
MissionEnd = "MissionEnd",
} }

View File

@@ -29,22 +29,22 @@ debuff: 0depb:50,:无12灼烧3眩晕4降低攻击5
*/ */
export const SkillSet={ export const SkillSet={
6001:{uuid: 6001,path: "6001",type: 1,tg:3,debuff:0,depb:50,debtime:2,derate:1,name: "寒冰弹",sp_name:"ball_blue",info:"释放一个火球术攻击敌人", 6001:{uuid: 6001,path: "6001",type: 1,tg:3,debuff:0,depb:50,debtime:2,derate:1,name: "寒冰弹",sp_name:"ball_blue",info:"释放一个火球术攻击敌人",
in:0.2,count:1,apup:0,ap:1,hp:0,cd:1,shield:0,speed:450, }, in:0.8,count:1,apup:0,ap:1,hp:0,cd:1,shield:0,speed:450, },
6002:{uuid: 6002,path: "6002",type: 1,tg:3,debuff:0,depb:50,debtime:2,derate:1,name: "火焰弹",sp_name:"ball_red",info:"释放一个火球术攻击敌人", 6002:{uuid: 6002,path: "6002",type: 1,tg:3,debuff:0,depb:50,debtime:2,derate:1,name: "火焰弹",sp_name:"ball_red",info:"释放一个火球术攻击敌人",
in:0.2,count:1,apup:0,ap:1,hp:0,cd:1,shield:0,speed:450, }, in:0.8,count:1,apup:0,ap:1,hp:0,cd:1,shield:0,speed:450, },
6003:{uuid: 6003,path: "6003",type: 1,tg:3,debuff:0,depb:50,debtime:2,derate:1,name: "魔法弹",sp_name:"ball_green",info:"释放一个火球术攻击敌人", 6003:{uuid: 6003,path: "6003",type: 1,tg:3,debuff:0,depb:50,debtime:2,derate:1,name: "魔法弹",sp_name:"ball_green",info:"释放一个火球术攻击敌人",
in:0.2,count:1,apup:0,ap:1,hp:0,cd:1,shield:0,speed:450, }, in:0.8,count:1,apup:0,ap:1,hp:0,cd:1,shield:0,speed:450, },
6004:{uuid: 6004,path: "6004",type: 1,tg:3,debuff:0,depb:50,debtime:2,derate:1,name: "圣光弹",sp_name:"ball_yellow",info:"释放一个火球术攻击敌人", 6004:{uuid: 6004,path: "6004",type: 1,tg:3,debuff:0,depb:50,debtime:2,derate:1,name: "圣光弹",sp_name:"ball_yellow",info:"释放一个火球术攻击敌人",
in:0.2,count:1,apup:0,ap:1,hp:0,cd:1,shield:0,speed:450, }, in:0.8,count:1,apup:0,ap:1,hp:0,cd:1,shield:0,speed:450, },
6005:{uuid: 6005,path: "6005",type: 1,tg:3,debuff:0,depb:50,debtime:2,derate:1,name: "无形剑气",sp_name:"patk",info:"释放无形剑气攻击前方直线100码的敌人", 6005:{uuid: 6005,path: "6005",type: 1,tg:3,debuff:0,depb:50,debtime:2,derate:1,name: "无形剑气",sp_name:"patk",info:"释放无形剑气攻击前方直线100码的敌人",
in:0.2,count:1,apup:0,ap:1,hp:0,cd:1,shield:0,speed:450,}, in:0.8,count:1,apup:0,ap:1,hp:0,cd:1,shield:0,speed:450,},
6006:{uuid: 6006,path: "6006",type: 1,tg:3,debuff:0,depb:50,debtime:2,derate:1,name: "射击",sp_name:"arrow",info:"释放无形剑气攻击前方直线100码的敌人", 6006:{uuid: 6006,path: "6006",type: 1,tg:3,debuff:0,depb:50,debtime:2,derate:1,name: "射击",sp_name:"arrow",info:"释放无形剑气攻击前方直线100码的敌人",
in:0.2,count:1,apup:0,ap:1,hp:0,cd:1,shield:0,speed:450,}, in:0.8,count:1,apup:0,ap:1,hp:0,cd:1,shield:0,speed:450,},
6011:{uuid: 6011,path: "6011",type: 2,tg:3,debuff:0,depb:50,debtime:2,derate:1,name: "有形剑气",sp_name:"dadao",info:"释放有形剑气攻击前方直线300码的敌人", 6011:{uuid: 6011,path: "6011",type: 2,tg:3,debuff:0,depb:50,debtime:2,derate:1,name: "有形剑气",sp_name:"dadao",info:"释放有形剑气攻击前方直线300码的敌人",
in:1,count:1,apup:0,ap:1,hp:0,cd:1,shield:0,speed:450,}, in:1,count:1,apup:0,ap:1,hp:0,cd:1,shield:0,speed:450,},
@@ -53,7 +53,7 @@ export const SkillSet={
in:1,count:1,apup:0,ap:1,hp:0,cd:1,shield:0,speed:450,}, in:1,count:1,apup:0,ap:1,hp:0,cd:1,shield:0,speed:450,},
6013:{uuid: 6013,path: "6013",type: 2,tg:3,debuff:7,depb:50,debtime:2,derate:0.01,name: "火墙",sp_name:"fires",info:"释放有形剑气攻击前方直线300码的敌人", 6013:{uuid: 6013,path: "6013",type: 2,tg:3,debuff:7,depb:50,debtime:2,derate:0.01,name: "火墙",sp_name:"fires",info:"释放有形剑气攻击前方直线300码的敌人",
in:5,count:1,apup:0,ap:1,hp:0,cd:2,shield:0,speed:450,}, in:10,count:1,apup:0,ap:1,hp:0,cd:2,shield:0,speed:450,},
6014:{uuid: 6014,path: "6014",type: 2,tg:3,debuff:1,depb:50,debtime:2,derate:1,name: "冰破术",sp_name:"ice",info:"释放有形剑气攻击前方直线300码的敌人", 6014:{uuid: 6014,path: "6014",type: 2,tg:3,debuff:1,depb:50,debtime:2,derate:1,name: "冰破术",sp_name:"ice",info:"释放有形剑气攻击前方直线300码的敌人",
in:1,count:1,apup:0,ap:2,hp:0,cd:1,shield:0,speed:450,}, in:1,count:1,apup:0,ap:2,hp:0,cd:1,shield:0,speed:450,},
@@ -68,10 +68,10 @@ export const SkillSet={
in:0.5,count:1,apup:0,ap:1,hp:3,shield:0,speed:450, }, in:0.5,count:1,apup:0,ap:1,hp:3,shield:0,speed:450, },
6018:{uuid: 6018,path: "6018",type: 91,tg:0,debuff:0,depb:50,debtime:2,derate:1,name: "魔法盾",sp_name:"shield",info:"释放一个寒冰箭攻击敌人", 6018:{uuid: 6018,path: "6018",type: 91,tg:0,debuff:0,depb:50,debtime:2,derate:1,name: "魔法盾",sp_name:"shield",info:"释放一个寒冰箭攻击敌人",
in:0.2,count:1,apup:0,ap:1,hp:0,cd:1,shield:1,speed:450, }, in:0.8,count:1,apup:0,ap:1,hp:0,cd:1,shield:1,speed:450, },
6019:{uuid: 6019,path: "6019",type: 91,tg:0,debuff:0,depb:50,debtime:2,derate:1,name: "狂暴",sp_name:"atkup",info:"释放一个寒冰箭攻击敌人", 6019:{uuid: 6019,path: "6019",type: 91,tg:0,debuff:0,depb:50,debtime:2,derate:1,name: "狂暴",sp_name:"atkup",info:"释放一个寒冰箭攻击敌人",
in:0.2,count:1,apup:0,ap:1,hp:0,cd:1,shield:0,speed:450, }, in:0.8,count:1,apup:0,ap:1,hp:0,cd:1,shield:0,speed:450, },
} }

View File

@@ -4,6 +4,7 @@ import { oops } from 'db://oops-framework/core/Oops';
import { ecs } from 'db://oops-framework/libs/ecs/ECS'; import { ecs } from 'db://oops-framework/libs/ecs/ECS';
import { Tooltip } from '../skills/Tooltip'; import { Tooltip } from '../skills/Tooltip';
import { timedCom } from '../skills/timedCom'; import { timedCom } from '../skills/timedCom';
import { smc } from '../common/SingletonModuleComp';
const { ccclass, property } = _decorator; const { ccclass, property } = _decorator;
@ccclass('BuffComp') @ccclass('BuffComp')
@@ -40,6 +41,7 @@ export class BuffComp extends Component {
} }
update(deltaTime: number) { update(deltaTime: number) {
if(smc.mission.pause) return
if(this.ap_cd > 0 ) this.ap_cd -= deltaTime; if(this.ap_cd > 0 ) this.ap_cd -= deltaTime;
if(this.ap_cd <= 0 && this.node.getChildByName("top").getChildByName("buff").getChildByName("ap").active){ if(this.ap_cd <= 0 && this.node.getChildByName("top").getChildByName("buff").getChildByName("ap").active){
this.node.getChildByName("top").getChildByName("buff").getChildByName("ap").active = false; this.node.getChildByName("top").getChildByName("buff").getChildByName("ap").active = false;

View File

@@ -1,10 +1,4 @@
/*
* @Author: dgflash
* @Date: 2021-11-18 17:47:56
* @LastEditors: dgflash
* @LastEditTime: 2022-08-04 15:43:04
*/
import { instantiate, Node, Prefab, Vec3 ,v3,resources,SpriteFrame,Sprite,SpriteAtlas} from "cc"; import { instantiate, Node, Prefab, Vec3 ,v3,resources,SpriteFrame,Sprite,SpriteAtlas} from "cc";
import { UICallbacks } from "../../../../extensions/oops-plugin-framework/assets/core/gui/layer/Defines"; import { UICallbacks } from "../../../../extensions/oops-plugin-framework/assets/core/gui/layer/Defines";
import { oops } from "../../../../extensions/oops-plugin-framework/assets/core/Oops"; import { oops } from "../../../../extensions/oops-plugin-framework/assets/core/Oops";

View File

@@ -312,13 +312,12 @@ export class HeroViewComp extends CCComp {
} }
skill_pos(){ skill_pos(){
return v3(0,35) return v3((this.node.position.x,this.node.position.y + 35))
} }
get_enemy_pos(){ get_enemy_pos(){
let t_pos:Vec3 = v3(720,0) let t_pos:Vec3 = v3(720,0)
if(this.enemy){ if(this.enemy){
t_pos = v3(this.enemy.x-this.node.position.x,this.enemy.y-this.node.position.y) t_pos = v3(this.enemy.x,this.enemy.y)
} }
console.log(this.hero_name+":"+this.uuid+"enemy ="+this.enemy.x+" x"+this.node.position.x+" t_pos"+t_pos); console.log(this.hero_name+":"+this.uuid+"enemy ="+this.enemy.x+" x"+this.node.position.x+" t_pos"+t_pos);
return t_pos return t_pos
@@ -328,7 +327,7 @@ export class HeroViewComp extends CCComp {
if(!hero.node.isValid){ if(!hero.node.isValid){
return return
}else{ }else{
t_pos = v3(hero.node.position.x-this.node.position.x,hero.node.position.y-this.node.position.y) t_pos = v3(hero.node.position.x,hero.node.position.y)
} }
return t_pos return t_pos
@@ -555,8 +554,8 @@ export class HeroViewComp extends CCComp {
let skill = ecs.getEntity<Skill>(Skill); let skill = ecs.getEntity<Skill>(Skill);
let t_pos=this.get_enemy_pos() let t_pos=this.get_enemy_pos()
let pos =this.skill_pos() let pos =this.skill_pos()
pos.y=pos.y + y pos.y=this.node.position.y + y
pos.x=pos.x + x pos.x=this.node.position.x + x
let is_crit=this.check_crit() let is_crit=this.check_crit()
skill.load(pos,this.box_group,this.node,sk,this.ap_max,t_pos,is_crit,this.crit_add); skill.load(pos,this.box_group,this.node,sk,this.ap_max,t_pos,is_crit,this.crit_add);
console.log(this.scale+this.hero_name+"使用技能:"+sk+" t_pos:"+t_pos+" box:"+this.box_group,); console.log(this.scale+this.hero_name+"使用技能:"+sk+" t_pos:"+t_pos+" box:"+this.box_group,);

View File

@@ -26,6 +26,7 @@ import { Monster } from "../hero/Mon";
import { UIID } from "../common/config/GameUIConfig"; import { UIID } from "../common/config/GameUIConfig";
import { CardControllerComp } from "./CardController"; import { CardControllerComp } from "./CardController";
import { MissionHomeComp } from "./MissionHomeComp"; import { MissionHomeComp } from "./MissionHomeComp";
import { GameEvent } from "../common/config/GameEvent";
const { ccclass, property } = _decorator; const { ccclass, property } = _decorator;
/** 视图层对象 */ /** 视图层对象 */
@@ -84,6 +85,7 @@ export class MissionComp extends CCComp {
} }
mission_end(){ mission_end(){
oops.message.dispatchEvent(GameEvent.MissionEnd)
smc.mission.play=false smc.mission.play=false
smc.mission.pause=false smc.mission.pause=false
let heros:any= this.get_heros();; let heros:any= this.get_heros();;

View File

@@ -1,27 +1,28 @@
import { _decorator, Component, Node, tween, v3, Vec3 } from 'cc'; import { _decorator, Component, Node, tween, v3, Vec3 } from 'cc';
import { SkillCom } from './SkillCom'; import { SkillCom } from './SkillCom';
import { smc } from '../common/SingletonModuleComp';
const { ccclass, property } = _decorator; const { ccclass, property } = _decorator;
@ccclass('BezCom') @ccclass('BezCom')
export class BezCom extends Component { export class BezCom extends Component {
start() { start() {
let base =this.node.getComponent(SkillCom) let base =this.node.getComponent(SkillCom)
if(this.node.parent.scale.x < 0){ // if(this.node.parent.scale.x < 0){
base.t_pos.x=base.t_pos.x*-1 // base.t_pos.x=base.t_pos.x*-1
} // }
let s_pos = v3(this.node.position.x,this.node.position.y) let s_pos = v3(this.node.position.x,this.node.position.y+35)
let c_pos = v3((base.t_pos.x+this.node.position.x)/2,this.node.position.y+100) let c_pos = v3((base.t_pos.x+this.node.position.x)/2,this.node.position.y+200)
let e_pos = v3(this.node.position.x+base.t_pos.x,this.node.position.y+base.t_pos.y) let e_pos = v3(base.t_pos.x,this.node.position.y+50)
let time =Math.abs(base.t_pos.x/base.speed) let time =Math.abs(base.t_pos.x/base.speed)
BezCom.bezierTo(this.node,time,s_pos,c_pos,e_pos,{ BezCom.bezierTo(this.node,base.in_time,s_pos,c_pos,e_pos,{
onComplete: (target?: object) => { onComplete: (target?: object) => {
base.is_destroy=true base.is_destroy=true
}, },
}).start(); }).start();
} }
update(deltaTime: number) { update(deltaTime: number) {
if(smc.mission.pause) return
} }
public static bezierTo(target: any, duration: number, c1: Vec3, c2: Vec3, to: Vec3, opts: any) { public static bezierTo(target: any, duration: number, c1: Vec3, c2: Vec3, to: Vec3, opts: any) {

View File

@@ -1,5 +1,6 @@
import { _decorator, Component, Node, tween, v3, Vec3 } from 'cc'; import { _decorator, Component, Node, tween, v3, Vec3 } from 'cc';
import { SkillCom } from './SkillCom'; import { SkillCom } from './SkillCom';
import { smc } from '../common/SingletonModuleComp';
const { ccclass, property } = _decorator; const { ccclass, property } = _decorator;
@ccclass('LineCom') @ccclass('LineCom')
@@ -11,6 +12,7 @@ export class LineCom extends Component {
} }
update(deltaTime: number) { update(deltaTime: number) {
if(smc.mission.pause) return
this.node.setPosition(this.node.position.x+this.base.speed*deltaTime,this.node.position.y,this.node.position.z) this.node.setPosition(this.node.position.x+this.base.speed*deltaTime,this.node.position.y,this.node.position.z)
if(this.node.position.x>1000||this.node.position.x<-1000){ if(this.node.position.x>1000||this.node.position.x<-1000){
this.base.is_destroy = true this.base.is_destroy = true

View File

@@ -29,8 +29,9 @@ export class Skill extends ecs.Entity {
// console.log("load skill :",path,prefab) // console.log("load skill :",path,prefab)
var node = instantiate(prefab); var node = instantiate(prefab);
pos=v3(pos.x,pos.y) pos=v3(pos.x,pos.y)
node.parent = parent; node.parent = parent.parent;
node.setPosition(pos) node.setPosition(pos)
if(group==BoxSet.MONSTER) node.setScale(v3(-1*node.scale.x,node.scale.y));
var sv = node.getComponent(SkillCom); var sv = node.getComponent(SkillCom);
// let angle=0 // let angle=0
// if(SkillSet[uuid].angle){ // if(SkillSet[uuid].angle){
@@ -54,7 +55,7 @@ export class Skill extends ecs.Entity {
// node.setScale(v3(node.scale.x*scale,node.scale.y)) // node.setScale(v3(node.scale.x*scale,node.scale.y))
sv.speed=SkillSet[uuid].speed; sv.speed=SkillSet[uuid].speed;
sv.in_time=SkillSet[uuid].in; sv.in_time=SkillSet[uuid].in;
// if(group==BoxSet.MONSTER) t_pos.x=-1*t_pos.x
sv.t_pos = t_pos; // 目标增量 sv.t_pos = t_pos; // 目标增量
sv.type = SkillSet[uuid].type; sv.type = SkillSet[uuid].type;
sv.box_tag= BoxSet.SKILL_TAG; sv.box_tag= BoxSet.SKILL_TAG;

View File

@@ -5,6 +5,8 @@ import { BoxSet } from "../common/config/BoxSet";
import { smc } from "../common/SingletonModuleComp"; import { smc } from "../common/SingletonModuleComp";
import { Timer } from "../../../../extensions/oops-plugin-framework/assets/core/common/timer/Timer"; import { Timer } from "../../../../extensions/oops-plugin-framework/assets/core/common/timer/Timer";
import { HeroViewComp } from "../hero/HeroViewComp"; import { HeroViewComp } from "../hero/HeroViewComp";
import { oops } from "../../../../extensions/oops-plugin-framework/assets/core/Oops";
import { GameEvent } from "../common/config/GameEvent";
const { ccclass, property } = _decorator; const { ccclass, property } = _decorator;
@@ -35,6 +37,7 @@ export class SkillCom extends CCComp {
in_time:number = 0.3; // 不动技能持续时间 in_time:number = 0.3; // 不动技能持续时间
enemys:any = []; enemys:any = [];
start() { start() {
oops.message.on(GameEvent.MissionEnd, this.doDestroy, this);
this.node.active=true this.node.active=true
let collider = this.getComponent(Collider2D); let collider = this.getComponent(Collider2D);
collider.group = this.box_group; collider.group = this.box_group;
@@ -73,7 +76,7 @@ export class SkillCom extends CCComp {
} }
update(deltaTime: number) { update(deltaTime: number) {
if(smc.mission.pause) return
this.toDestroy() this.toDestroy()
} }
@@ -82,6 +85,9 @@ export class SkillCom extends CCComp {
this.ent.destroy() this.ent.destroy()
} }
} }
doDestroy(){
this.is_destroy=true
}
/** 视图对象通过 ecs.Entity.remove(ModuleViewComp) 删除组件是触发组件处理自定义释放逻辑 */ /** 视图对象通过 ecs.Entity.remove(ModuleViewComp) 删除组件是触发组件处理自定义释放逻辑 */
reset() { reset() {
this.is_destroy=false this.is_destroy=false

View File

@@ -1,6 +1,7 @@
import { _decorator, Component, Node, v3 } from 'cc'; import { _decorator, Component, Node, v3 } from 'cc';
import { SkillCom } from './SkillCom'; import { SkillCom } from './SkillCom';
import { BoxSet } from '../common/config/BoxSet'; import { BoxSet } from '../common/config/BoxSet';
import { smc } from '../common/SingletonModuleComp';
const { ccclass, property } = _decorator; const { ccclass, property } = _decorator;
@ccclass('TgCom') @ccclass('TgCom')
@@ -10,13 +11,11 @@ export class TgCom extends Component {
base:SkillCom = null base:SkillCom = null
start() { start() {
this.base =this.node.getComponent(SkillCom) this.base =this.node.getComponent(SkillCom)
if(this.base.box_group==BoxSet.MONSTER){
this.base.t_pos.x=-1*this.base.t_pos.x
}
this.node.setPosition(this.base.t_pos) this.node.setPosition(this.base.t_pos)
} }
update(deltaTime: number) { update(deltaTime: number) {
if(smc.mission.pause) return
this.cd+=deltaTime this.cd+=deltaTime
if(this.cd>=1){ if(this.cd>=1){
// this.node.setPosition(v3(-1000,0,0)) // this.node.setPosition(v3(-1000,0,0))

View File

@@ -1,6 +1,7 @@
import { _decorator, Component, Node } from 'cc'; import { _decorator, Component, Node } from 'cc';
import { timedCom } from './timedCom'; import { timedCom } from './timedCom';
import { HeroViewComp } from '../hero/HeroViewComp'; import { HeroViewComp } from '../hero/HeroViewComp';
import { smc } from '../common/SingletonModuleComp';
const { ccclass, property } = _decorator; const { ccclass, property } = _decorator;
@ccclass('debuff') @ccclass('debuff')
@@ -16,6 +17,7 @@ export class debuff extends Component {
} }
update(deltaTime: number) { update(deltaTime: number) {
if(smc.mission.pause) return
this.cd += deltaTime this.cd += deltaTime
if(this.cd >=1){ if(this.cd >=1){
// this.node.setPosition(v3(-1000,0,0)) // this.node.setPosition(v3(-1000,0,0))

View File

@@ -1,5 +1,6 @@
import { _decorator, Component, Node } from 'cc'; import { _decorator, Component, Node } from 'cc';
import { SkillSet } from '../common/config/SkillSet'; import { SkillSet } from '../common/config/SkillSet';
import { smc } from '../common/SingletonModuleComp';
const { ccclass, property } = _decorator; const { ccclass, property } = _decorator;
@ccclass('timedCom') @ccclass('timedCom')