This commit is contained in:
pan@work
2024-08-26 17:33:14 +08:00
parent 7b618eb645
commit 8a44a15153
18 changed files with 1413 additions and 808 deletions

View File

@@ -34,7 +34,7 @@ export class RoleViewComp extends CCComp {
hp_max:number = 1000;
power: number = 0;
stop_cd:number = 0;
atk_cd:number = 20;
atk_cd:number = 10;
atk:number = 10;
skill_uuid:number = 9003;
max_skill_uuid:number = 1001;

View File

@@ -31,6 +31,6 @@ export enum BoxSet {
CSKILL_X = 280,
CSKILL_Y = 420,
//攻击距离
ATK_RANGE_X = 40,
MOVE_RANGE_X = 15,
ATK_RANGE_X = 85,
MOVE_RANGE_X = 20,
}

View File

@@ -1,58 +1,73 @@
export const CardType = {
1: "前排",
2: "后排",
}
/*
type
1 远距离攻击,碰撞后 结束
2 远距离攻击,碰撞后 持续,直到技能结束
3 远距离攻击,碰撞后 持续,带击退功能
4 双技能技能1技能结束后触发2技能
5: 特殊技能,触发特殊弹窗选项
9 buff 技能,
sd 卡片技能图标持续时间
cd 卡片技能释放本技能cd
count卡片1次释放本技能数
bsdbuff技能作用持续时间
bcdbuff技能执行一次间隔
sk_uuid:子技能id
sk_count:子技能个数
sp_name : 预制体名称
path: 图片地址
*/
export const SkillSet={
1001:{uuid: 1001,path: "1001",type: 1,level: 1,name: "火球术-初级",sp_name:"fire",dis:1720,count:1,atk:4,sd:10,cd:1,speed:350,},
1002:{uuid: 1002,path: "1002",type: 1,level: 1,name: "寒冰箭-初级",sp_name:"fire",dis:720,count:1,atk:4,sd:10,cd:1,speed:350,},
1003:{uuid: 1003,path: "1003",type: 1,level: 1,name: "狂暴-初级",sp_name:"fire",dis:720,count:1,atk:4,sd:10,cd:1,speed:350,},
1004:{uuid: 1004,path: "1004",type: 1,level: 1,name: "守护-初级",sp_name:"fire",dis:720,count:1,atk:4,sd:10,cd:1,speed:350,},
1005:{uuid: 1005,path: "1005",type: 1,level: 1,name: "雷霆-初级",sp_name:"fire",dis:720,count:1,atk:4,sd:10,cd:1,speed:350,},
1006:{uuid: 1006,path: "1006",type: 1,level: 1,name: "再生-初级",sp_name:"fire",dis:720,count:1,atk:4,sd:10,cd:1,speed:350,},
1007:{uuid: 1007,path: "1007",type: 1,level: 1,name: "复生-初级",sp_name:"fire",dis:720,count:1,atk:4,sd:10,cd:1,speed:350,},
1008:{uuid: 1008,path: "1008",type: 1,level: 1,name: "灵巧-初级",sp_name:"fire",dis:720,count:1,atk:4,sd:10,cd:1,speed:350,},
1009:{uuid: 1009,path: "1009",type: 1,level: 1,name: "盾守-初级",sp_name:"fire",dis:720,count:1,atk:4,sd:10,cd:1,speed:350,},
1010:{uuid: 1010,path: "1010",type: 1,level: 1,name: "治愈-初级",sp_name:"fire",dis:720,count:1,atk:4,sd:10,cd:1,speed:350,},
1011:{uuid: 1011,path: "1011",type: 1,level: 3,name: "火焰风暴-初级",sp_name:"fire",dis:720,count:1,atk:4,sd:10,cd:1,speed:350,},
1012:{uuid: 1012,path: "1012",type: 1,level: 3,name: "冰晶风暴-初级",sp_name:"fire",dis:720,count:1,atk:4,sd:10,cd:1,speed:350,},
2001:{uuid: 2001,path: "1001",type: 1,level: 2,name: "火球术-中级",sp_name:"fire",dis:720,count:1,atk:4,sd:10,cd:1,speed:350,},
2002:{uuid: 2002,path: "1002",type: 1,level: 2,name: "寒冰箭-中级",sp_name:"fire",dis:720,count:1,atk:4,sd:10,cd:1,speed:350,},
2003:{uuid: 2003,path: "1003",type: 1,level: 2,name: "狂暴-中级",sp_name:"fire",dis:720,count:1,atk:4,sd:10,cd:1,speed:350,},
2004:{uuid: 2004,path: "1004",type: 1,level: 2,name: "守护-中级",sp_name:"fire",dis:720,count:1,atk:4,sd:10,cd:1,speed:350,},
2005:{uuid: 2005,path: "1005",type: 1,level: 2,name: "雷霆-中级",sp_name:"fire",dis:720,count:1,atk:4,sd:10,cd:1,speed:350,},
2006:{uuid: 2006,path: "1006",type: 1,level: 2,name: "再生-中级",sp_name:"fire",dis:720,count:1,atk:4,sd:10,cd:1,speed:350,},
2007:{uuid: 2007,path: "1007",type: 1,level: 2,name: "复生-中级",sp_name:"fire",dis:720,count:1,atk:4,sd:10,cd:1,speed:350,},
2008:{uuid: 2008,path: "1008",type: 1,level: 2,name: "灵巧-中级",sp_name:"fire",dis:720,count:1,atk:4,sd:10,cd:1,speed:350,},
2009:{uuid: 2009,path: "1009",type: 1,level: 2,name: "盾守-中级",sp_name:"fire",dis:720,count:1,atk:4,sd:10,cd:1,speed:350,},
2010:{uuid: 2010,path: "1010",type: 1,level: 2,name: "治愈-中级",sp_name:"fire",dis:720,count:1,atk:4,sd:10,cd:1,speed:350,},
2011:{uuid: 2011,path: "1011",type: 1,level: 4,name: "火焰风暴-中级",sp_name:"fire",dis:720,count:1,atk:4,sd:10,cd:1,speed:350,},
2012:{uuid: 2012,path: "1012",type: 1,level: 4,name: "冰晶风暴-中级",sp_name:"fire",dis:720,count:1,atk:4,sd:10,cd:1,speed:350,},
3001:{uuid: 3001,path: "1001",type: 1,level: 3,name: "火球术-高级",sp_name:"fire",dis:720,count:1,atk:4,sd:10,cd:1,speed:350,},
3002:{uuid: 3002,path: "1002",type: 1,level: 3,name: "寒冰箭-高级",sp_name:"fire",dis:720,count:1,atk:4,sd:10,cd:1,speed:350,},
3003:{uuid: 3003,path: "1003",type: 1,level: 3,name: "狂暴-高级",sp_name:"fire",dis:720,count:1,atk:4,sd:10,cd:1,speed:350,},
3004:{uuid: 3004,path: "1004",type: 1,level: 3,name: "守护-高级",sp_name:"fire",dis:720,count:1,atk:4,sd:10,cd:1,speed:350,},
3005:{uuid: 3005,path: "1005",type: 1,level: 3,name: "雷霆-高级",sp_name:"fire",dis:720,count:1,atk:4,sd:10,cd:1,speed:350,},
3006:{uuid: 3006,path: "1006",type: 1,level: 3,name: "再生-高级",sp_name:"fire",dis:720,count:1,atk:4,sd:10,cd:1,speed:350,},
3007:{uuid: 3007,path: "1007",type: 1,level: 3,name: "复生-高级",sp_name:"fire",dis:720,count:1,atk:4,sd:10,cd:1,speed:350,},
3008:{uuid: 3008,path: "1008",type: 1,level: 3,name: "灵巧-高级",sp_name:"fire",dis:720,count:1,atk:4,sd:10,cd:1,speed:350,},
3009:{uuid: 3009,path: "1009",type: 1,level: 3,name: "盾守-高级",sp_name:"fire",dis:720,count:1,atk:4,sd:10,cd:1,speed:350,},
3010:{uuid: 3010,path: "1010",type: 1,level: 3,name: "治愈-高级",sp_name:"fire",dis:720,count:1,atk:4,sd:10,cd:1,speed:350,},
3011:{uuid: 3011,path: "1011",type: 1,level: 5,name: "火焰风暴-高级",sp_name:"fire",dis:720,count:1,atk:4,sd:10,cd:1,speed:350,},
3012:{uuid: 3012,path: "1012",type: 1,level: 5,name: "冰晶风暴-高级",sp_name:"fire",dis:720,count:1,atk:4,sd:10,cd:1,speed:350,},
4001:{uuid: 4001,path: "1001",type: 1,level: 4,name: "火球术-终极",sp_name:"fire",dis:720,count:1,atk:4,sd:10,cd:1,speed:350,},
4002:{uuid: 4002,path: "1002",type: 1,level: 4,name: "寒冰箭-终极",sp_name:"fire",dis:720,count:1,atk:4,sd:10,cd:1,speed:350,},
4003:{uuid: 4003,path: "1003",type: 1,level: 4,name: "狂暴-终极",sp_name:"fire",dis:720,count:1,atk:4,sd:10,cd:1,speed:350,},
4004:{uuid: 4004,path: "1004",type: 1,level: 4,name: "守护-终极",sp_name:"fire",dis:720,count:1,atk:4,sd:10,cd:1,speed:350,},
4005:{uuid: 4005,path: "1005",type: 1,level: 4,name: "雷霆-终极",sp_name:"fire",dis:720,count:1,atk:4,sd:10,cd:1,speed:350,},
4006:{uuid: 4006,path: "1006",type: 1,level: 4,name: "再生-终极",sp_name:"fire",dis:720,count:1,atk:4,sd:10,cd:1,speed:350,},
4007:{uuid: 4007,path: "1007",type: 1,level: 4,name: "复生-终极",sp_name:"fire",dis:720,count:1,atk:4,sd:10,cd:1,speed:350,},
4008:{uuid: 4008,path: "1008",type: 1,level: 4,name: "灵巧-终极",sp_name:"fire",dis:720,count:1,atk:4,sd:10,cd:1,speed:350,},
4009:{uuid: 4009,path: "1009",type: 1,level: 4,name: "盾守-终极",sp_name:"fire",dis:720,count:1,atk:4,sd:10,cd:1,speed:350,},
4010:{uuid: 4010,path: "1010",type: 1,level: 4,name: "治愈-终极",sp_name:"fire",dis:720,count:1,atk:4,sd:10,cd:1,speed:350,},
4011:{uuid: 4011,path: "1011",type: 1,level: 6,name: "火焰风暴-终极",sp_name:"fire",dis:720,count:1,atk:4,sd:10,cd:1,speed:350,},
4012:{uuid: 4012,path: "1012",type: 1,level: 6,name: "冰晶风暴-终极",sp_name:"fire",dis:720,count:1,atk:4,sd:10,cd:1,speed:350,},
9001:{uuid: 9001,path: "9001",type: 1,level: 1,name: "基础攻击1",sp_name:"base",dis:30,count:1,atk:0,sd:10,cd:3,speed:450,},
9002:{uuid: 9002,path: "9002",type: 1,level: 1,name: "基础攻击2",sp_name:"base2",dis:30,count:1,atk:0,sd:10,cd:3,speed:450,},
9003:{uuid: 9003,path: "9003",type: 2,level: 1,name: "基础攻击3",sp_name:"base3",dis:720,count:1,atk:0,sd:10,cd:3,speed:450,},
1001:{uuid: 1001,path: "1001",type: 1,level: 1,name: "火球术-初级",sp_name:"fire",dis:1720,count:1,atk:10,sd:10,cd:1,bsd:10,bcd:1,sk_uuid:1001,sk_count:0,speed:350,},
1002:{uuid: 1002,path: "1002",type: 1,level: 1,name: "寒冰箭-初级",sp_name:"ice",dis:720,count:1,atk:10,sd:10,cd:1,bsd:10,bcd:1,sk_uuid:1001,sk_count:0,speed:350,},
1003:{uuid: 1003,path: "1003",type: 9,level: 1,name: "狂暴-初级",sp_name:"fire",dis:720,count:1,atk:10,sd:10,cd:1,bsd:10,bcd:1,sk_uuid:1001,sk_count:0,speed:350,},
1004:{uuid: 1004,path: "1004",type: 9,level: 1,name: "守护-初级",sp_name:"fire",dis:720,count:1,atk:10,sd:10,cd:1,bsd:10,bcd:1,sk_uuid:1001,sk_count:0,speed:350,},
1005:{uuid: 1005,path: "1005",type: 9,level: 1,name: "雷霆-初级",sp_name:"fire",dis:720,count:1,atk:10,sd:10,cd:1,bsd:10,bcd:1,sk_uuid:1001,sk_count:0,speed:350,},
1006:{uuid: 1006,path: "1006",type: 9,level: 1,name: "再生-初级",sp_name:"fire",dis:720,count:1,atk:10,sd:10,cd:1,bsd:10,bcd:1,sk_uuid:1001,sk_count:0,speed:350,},
1007:{uuid: 1007,path: "1007",type: 5,level: 1,name: "复生-初级",sp_name:"fire",dis:720,count:1,atk:10,sd:10,cd:1,bsd:10,bcd:1,sk_uuid:1001,sk_count:0,speed:350,},
1008:{uuid: 1008,path: "1008",type: 9,level: 1,name: "灵巧-初级",sp_name:"fire",dis:720,count:1,atk:10,sd:10,cd:1,bsd:10,bcd:1,sk_uuid:1001,sk_count:0,speed:350,},
1009:{uuid: 1009,path: "1009",type: 9,level: 1,name: "盾守-初级",sp_name:"fire",dis:720,count:1,atk:10,sd:10,cd:1,bsd:10,bcd:1,sk_uuid:1001,sk_count:0,speed:350,},
1010:{uuid: 1010,path: "1010",type: 9,level: 1,name: "治愈-初级",sp_name:"fire",dis:720,count:1,atk:10,sd:10,cd:1,bsd:10,bcd:1,sk_uuid:1001,sk_count:0,speed:350,},
1011:{uuid: 1011,path: "1011",type: 1,level: 3,name: "火焰风暴-初级",sp_name:"fire",dis:720,count:3,atk:10,sd:10,cd:1,bsd:10,bcd:1,sk_uuid:1001,sk_count:0,speed:350,},
1012:{uuid: 1012,path: "1012",type: 1,level: 3,name: "冰晶风暴-初级",sp_name:"ice",dis:720,count:3,atk:10,sd:10,cd:1,bsd:10,bcd:1,sk_uuid:1001,sk_count:0,speed:350,},
2001:{uuid: 2001,path: "1001",type: 1,level: 2,name: "火球术-中级",sp_name:"fire",dis:720,count:1,atk:10,sd:10,cd:1,bsd:10,bcd:1,sk_uuid:1001,sk_count:0,speed:350,},
2002:{uuid: 2002,path: "1002",type: 1,level: 2,name: "寒冰箭-中级",sp_name:"fire",dis:720,count:1,atk:10,sd:10,cd:1,bsd:10,bcd:1,sk_uuid:1001,sk_count:0,speed:350,},
2003:{uuid: 2003,path: "1003",type: 9,level: 2,name: "狂暴-中级",sp_name:"fire",dis:720,count:1,atk:10,sd:10,cd:1,bsd:10,bcd:1,sk_uuid:1001,sk_count:0,speed:350,},
2004:{uuid: 2004,path: "1004",type: 9,level: 2,name: "守护-中级",sp_name:"fire",dis:720,count:1,atk:10,sd:10,cd:1,bsd:10,bcd:1,sk_uuid:1001,sk_count:0,speed:350,},
2005:{uuid: 2005,path: "1005",type: 9,level: 2,name: "雷霆-中级",sp_name:"fire",dis:720,count:1,atk:10,sd:10,cd:1,bsd:10,bcd:1,sk_uuid:1001,sk_count:0,speed:350,},
2006:{uuid: 2006,path: "1006",type: 9,level: 2,name: "再生-中级",sp_name:"fire",dis:720,count:1,atk:10,sd:10,cd:1,bsd:10,bcd:1,sk_uuid:1001,sk_count:0,speed:350,},
2007:{uuid: 2007,path: "1007",type: 5,level: 2,name: "复生-中级",sp_name:"fire",dis:720,count:1,atk:10,sd:10,cd:1,bsd:10,bcd:1,sk_uuid:1001,sk_count:0,speed:350,},
2008:{uuid: 2008,path: "1008",type: 9,level: 2,name: "灵巧-中级",sp_name:"fire",dis:720,count:1,atk:10,sd:10,cd:1,bsd:10,bcd:1,sk_uuid:1001,sk_count:0,speed:350,},
2009:{uuid: 2009,path: "1009",type: 9,level: 2,name: "盾守-中级",sp_name:"fire",dis:720,count:1,atk:10,sd:10,cd:1,bsd:10,bcd:1,sk_uuid:1001,sk_count:0,speed:350,},
2010:{uuid: 2010,path: "1010",type: 9,level: 2,name: "治愈-中级",sp_name:"fire",dis:720,count:1,atk:10,sd:10,cd:1,bsd:10,bcd:1,sk_uuid:1001,sk_count:0,speed:350,},
2011:{uuid: 2011,path: "1011",type: 1,level: 4,name: "火焰风暴-中级",sp_name:"fire",dis:720,count:3,atk:10,sd:10,cd:1,bsd:10,bcd:1,sk_uuid:1001,sk_count:0,speed:350,},
2012:{uuid: 2012,path: "1012",type: 1,level: 4,name: "冰晶风暴-中级",sp_name:"ice",dis:720,count:3,atk:10,sd:10,cd:1,bsd:10,bcd:1,sk_uuid:1001,sk_count:0,speed:350,},
3001:{uuid: 3001,path: "1001",type: 1,level: 3,name: "火球术-高级",sp_name:"fire",dis:720,count:1,atk:10,sd:10,cd:1,bsd:10,bcd:1,sk_uuid:1001,sk_count:0,speed:350,},
3002:{uuid: 3002,path: "1002",type: 1,level: 3,name: "寒冰箭-高级",sp_name:"fire",dis:720,count:1,atk:10,sd:10,cd:1,bsd:10,bcd:1,sk_uuid:1001,sk_count:0,speed:350,},
3003:{uuid: 3003,path: "1003",type: 9,level: 3,name: "狂暴-高级",sp_name:"fire",dis:720,count:1,atk:10,sd:10,cd:1,bsd:10,bcd:1,sk_uuid:1001,sk_count:0,speed:350,},
3004:{uuid: 3004,path: "1004",type: 9,level: 3,name: "守护-高级",sp_name:"fire",dis:720,count:1,atk:10,sd:10,cd:1,bsd:10,bcd:1,sk_uuid:1001,sk_count:0,speed:350,},
3005:{uuid: 3005,path: "1005",type: 9,level: 3,name: "雷霆-高级",sp_name:"fire",dis:720,count:1,atk:10,sd:10,cd:1,bsd:10,bcd:1,sk_uuid:1001,sk_count:0,speed:350,},
3006:{uuid: 3006,path: "1006",type: 9,level: 3,name: "再生-高级",sp_name:"fire",dis:720,count:1,atk:10,sd:10,cd:1,bsd:10,bcd:1,sk_uuid:1001,sk_count:0,speed:350,},
3007:{uuid: 3007,path: "1007",type: 5,level: 3,name: "复生-高级",sp_name:"fire",dis:720,count:1,atk:10,sd:10,cd:1,bsd:10,bcd:1,sk_uuid:1001,sk_count:0,speed:350,},
3008:{uuid: 3008,path: "1008",type: 9,level: 3,name: "灵巧-高级",sp_name:"fire",dis:720,count:1,atk:10,sd:10,cd:1,bsd:10,bcd:1,sk_uuid:1001,sk_count:0,speed:350,},
3009:{uuid: 3009,path: "1009",type: 9,level: 3,name: "盾守-高级",sp_name:"fire",dis:720,count:1,atk:10,sd:10,cd:1,bsd:10,bcd:1,sk_uuid:1001,sk_count:0,speed:350,},
3010:{uuid: 3010,path: "1010",type: 9,level: 3,name: "治愈-高级",sp_name:"fire",dis:720,count:1,atk:10,sd:10,cd:1,bsd:10,bcd:1,sk_uuid:1001,sk_count:0,speed:350,},
3011:{uuid: 3011,path: "1011",type: 1,level: 5,name: "火焰风暴-高级",sp_name:"fire",dis:720,count:5,atk:10,sd:10,cd:1,bsd:10,bcd:1,sk_uuid:1001,sk_count:0,speed:350,},
3012:{uuid: 3012,path: "1012",type: 1,level: 5,name: "冰晶风暴-高级",sp_name:"ice",dis:720,count:5,atk:10,sd:10,cd:1,bsd:10,bcd:1,sk_uuid:1001,sk_count:0,speed:350,},
4001:{uuid: 4001,path: "1001",type: 1,level: 4,name: "火球术-终极",sp_name:"fire",dis:720,count:1,atk:10,sd:10,cd:1,bsd:10,bcd:1,sk_uuid:1001,sk_count:0,speed:350,},
4002:{uuid: 4002,path: "1002",type: 1,level: 4,name: "寒冰箭-终极",sp_name:"fire",dis:720,count:1,atk:10,sd:10,cd:1,bsd:10,bcd:1,sk_uuid:1001,sk_count:0,speed:350,},
4003:{uuid: 4003,path: "1003",type: 9,level: 4,name: "狂暴-终极",sp_name:"fire",dis:720,count:1,atk:10,sd:10,cd:1,bsd:10,bcd:1,sk_uuid:1001,sk_count:0,speed:350,},
4004:{uuid: 4004,path: "1004",type: 9,level: 4,name: "守护-终极",sp_name:"fire",dis:720,count:1,atk:10,sd:10,cd:1,bsd:10,bcd:1,sk_uuid:1001,sk_count:0,speed:350,},
4005:{uuid: 4005,path: "1005",type: 9,level: 4,name: "雷霆-终极",sp_name:"fire",dis:720,count:1,atk:10,sd:10,cd:1,bsd:10,bcd:1,sk_uuid:1001,sk_count:0,speed:350,},
4006:{uuid: 4006,path: "1006",type: 9,level: 4,name: "再生-终极",sp_name:"fire",dis:720,count:1,atk:10,sd:10,cd:1,bsd:10,bcd:1,sk_uuid:1001,sk_count:0,speed:350,},
4007:{uuid: 4007,path: "1007",type: 5,level: 4,name: "复生-终极",sp_name:"fire",dis:720,count:1,atk:10,sd:10,cd:1,bsd:10,bcd:1,sk_uuid:1001,sk_count:0,speed:350,},
4008:{uuid: 4008,path: "1008",type: 9,level: 4,name: "灵巧-终极",sp_name:"fire",dis:720,count:1,atk:10,sd:10,cd:1,bsd:10,bcd:1,sk_uuid:1001,sk_count:0,speed:350,},
4009:{uuid: 4009,path: "1009",type: 9,level: 4,name: "盾守-终极",sp_name:"fire",dis:720,count:1,atk:10,sd:10,cd:1,bsd:10,bcd:1,sk_uuid:1001,sk_count:0,speed:350,},
4010:{uuid: 4010,path: "1010",type: 9,level: 4,name: "治愈-终极",sp_name:"fire",dis:720,count:1,atk:10,sd:10,cd:1,bsd:10,bcd:1,sk_uuid:1001,sk_count:0,speed:350,},
4011:{uuid: 4011,path: "1011",type: 1,level: 6,name: "火焰风暴-终极",sp_name:"fire",dis:720,count:5,atk:10,sd:10,cd:1,bsd:10,bcd:1,sk_uuid:1001,sk_count:0,speed:350,},
4012:{uuid: 4012,path: "1012",type: 1,level: 6,name: "冰晶风暴-终极",sp_name:"ice",dis:720,count:5,atk:10,sd:10,cd:1,bsd:10,bcd:1,sk_uuid:1001,sk_count:0,speed:350,},
9001:{uuid: 9001,path: "9001",type: 1,level: 1,name: "基础攻击1",sp_name:"base",dis:70,count:1,atk:0,sd:10,cd:3,bsd:10,bcd:1,sk_uuid:1001,sk_count:0,speed:450,},
9002:{uuid: 9002,path: "9002",type: 1,level: 1,name: "基础攻击2",sp_name:"base2",dis:70,count:1,atk:0,sd:10,cd:3,bsd:10,bcd:1,sk_uuid:1001,sk_count:0,speed:450,},
9003:{uuid: 9003,path: "9003",type: 2,level: 1,name: "基础攻击3",sp_name:"base3",dis:720,count:1,atk:0,sd:10,cd:3,bsd:10,bcd:1,sk_uuid:1001,sk_count:0,speed:450,},
}

View File

@@ -54,7 +54,7 @@ export class CardControllerComp extends CCComp {
if (this.in_load) {
return
}
if((smc.vm_data.shuaxin.max-smc.vm_data.shuaxin.min) < 1 ){
if((smc.vm_data.shuaxin.max-smc.vm_data.shuaxin.min) < 0.5 ){
oops.gui.toast("马上就要刷新了")
return
}

View File

@@ -49,13 +49,13 @@ export class BoxRangComp extends CCComp {
}
onPreSolve (selfCollider: Collider2D, otherCollider: Collider2D, contact: IPhysics2DContact | null) {
if(selfCollider.group != otherCollider.group&&otherCollider.tag == 0){
this.MonsterViewComp.is_atking = true;
let scene =smc.map.MapView.scene.mapLayer!.node!
let other_pos = otherCollider.node.getWorldPosition() ;
let self_pos = this.node.getWorldPosition();
// console.log("onPreSolve:",self_pos,other_pos);
if(Math.abs(other_pos.x-self_pos.x) < BoxSet.ATK_RANGE_X){
this.MonsterViewComp.stop_cd = 0.1
this.MonsterViewComp.is_atking = true;
// this.MonsterViewComp.stop_cd = 0.1
}
}

View File

@@ -61,7 +61,7 @@ export class CSkillComp extends CCComp {
}else{
m_pos = v3(BoxSet.MONSTER_START,BoxSet.GAME_LINE)
}
t_pos = v3(m_pos.x-this.node.position.x,m_pos.y-this.node.position.y)
t_pos = v3(m_pos.x-this.node.position.x,m_pos.y-this.node.position.y) // 目标增量
// console.log("m_pos",this.node.position,m_pos);
let dx=m_pos.x-this.node.position.x
let dy=m_pos.y-this.node.position.y

View File

@@ -63,9 +63,7 @@ export class HeroCard extends ecs.Entity {
node.parent = parent;
// node.getChildByName("avatar").setScale(node.getChildByName("avatar").scale.x*scale, node.getChildByName("avatar").scale.y, node.getChildByName("avatar").scale.z);
node.setPosition(pos)
resources.load(url, SpriteAtlas, (err: any, atlas) => {
console.log("hero_card load",node)
const sprite = node.getChildByName("hero").getComponent(Sprite);
sprite.spriteFrame = atlas.getSpriteFrame(pathName);
});

View File

@@ -208,7 +208,7 @@ export class MonsterViewComp extends CCComp {
// console.log("monster shoot");
let skill = ecs.getEntity<Skill>(Skill);
let x=32
let pos = v3(32,30)
let pos = v3(35,40)
let scale = this.scale
let speed =SkillSet[skill_uuid].speed;
let dis = SkillSet[skill_uuid].dis;

View File

@@ -33,7 +33,9 @@ export class Skill extends ecs.Entity {
var path = "game/skills/"+SkillSet[uuid].sp_name;
var prefab: Prefab = oops.res.get(path, Prefab)!;
var node = instantiate(prefab);
node.parent = parent;
// console.log("load skill parent.position :",parent.position)
pos=v3(parent.position.x+pos.x,parent.position.y+pos.y)
node.parent = parent.parent;
// node.setScale(scale,1)
//转换pos为世界坐标
node.setPosition(pos)
@@ -43,7 +45,7 @@ export class Skill extends ecs.Entity {
sv.scale = scale;
sv.atk = atk;
sv.angle = angle;
sv.t_pos = t_pos;
sv.t_pos = t_pos; // 目标增量
sv.type = SkillSet[uuid].type;
sv.box_tag= BoxSet.SKILL_TAG;
if(scale == 1){
@@ -54,12 +56,3 @@ export class Skill extends ecs.Entity {
this.add(sv);
}
}
/** Skill 模块业务逻辑系统组件,如无业务逻辑处理可删除此对象 */
export class EcsSkillSystem extends ecs.System {
constructor() {
super();
// this.add(new ecs.ComblockSystem());
}
}

View File

@@ -23,13 +23,14 @@ export class SkillCom extends CCComp {
scale:number = 1;
atk:number = 10;
angle:number = 0;
t_pos:Vec3 = null;
t_pos:Vec3 = null; // 目标增量
is_destroy:boolean = false;
box_group:number = 0;
box_tag:number=0;
type:number = 1;
time:Timer = new Timer(0.01);
start() {
// console.log("skill start position :",this.node.position)
this.node.active=true
this.node.angle = this.angle;
let collider = this.getComponent(Collider2D);
@@ -43,7 +44,7 @@ export class SkillCom extends CCComp {
collider.on(Contact2DType.POST_SOLVE, this.onPostSolve, this);
}
if(this.t_pos){
//通过欧拉角 延长 目标点位置
//通过欧拉角 延长 目标点 增量
this.t_pos.x=Math.cos(this.angle * Math.PI / 180) * this.dis;
this.t_pos.y=Math.sin(this.angle * Math.PI / 180) * this.dis;
tween(this.node).to( 1,{ angle:this.angle,position: this.t_pos},

View File

@@ -0,0 +1,40 @@
import { oops } from "../../../../extensions/oops-plugin-framework/assets/core/Oops";
import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
import { BoxSet } from "../common/config/BoxSet";
import { SkillSet } from "../common/config/SkillSet";
import { smc } from "../common/SingletonModuleComp";
import { TooltipCom } from "./TooltipCom";
import { instantiate, Node, Prefab, Vec3 ,tween, v3,animation,Label,resources,SpriteFrame,Sprite} from "cc";
/** Skill 模块 */
@ecs.register(`Tooltip`)
export class Tooltip extends ecs.Entity {
/** ---------- 数据层 ---------- */
// SkillModel!: SkillModelComp;
/** ---------- 业务层 ---------- */
// SkillBll!: SkillBllComp;
/** ---------- 视图层 ---------- */
TooltipView!: TooltipCom;
/** 实始添加的数据层组件 */
protected init() {
}
/** 模块资源释放 */
destroy() {
// 注: 自定义释放逻辑,视图层实现 ecs.IComp 接口的 ecs 组件需要手动释放
this.remove(TooltipCom);
super.destroy();
}
load(pos: Vec3 = Vec3.ZERO,type:number=1,vaule:string="",icon:string="") {
var path = "game/skills/tooltip";
var prefab: Prefab = oops.res.get(path, Prefab)!;
var node = instantiate(prefab);
node.setPosition(pos)
var sv = node.getComponent(TooltipCom)!;
this.add(sv)
}
}

View File

@@ -0,0 +1,9 @@
{
"ver": "4.0.23",
"importer": "typescript",
"imported": true,
"uuid": "a5e3c618-6636-439e-aa36-d4ee97793b18",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@@ -0,0 +1,56 @@
import { _decorator,Collider2D ,Contact2DType,v3,IPhysics2DContact,Vec3, tween, Label,resources,SpriteFrame,Sprite} 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 { BoxSet } from "../common/config/BoxSet";
import { smc } from "../common/SingletonModuleComp";
import { Timer } from "../../../../extensions/oops-plugin-framework/assets/core/common/timer/Timer";
const { ccclass, property } = _decorator;
/** 视图层对象 */
@ccclass('TooltipCom')
@ecs.register('TooltipView', false)
export class TooltipCom extends CCComp {
/** 视图层逻辑代码分离演示 */
// start() {
// // var entity = this.ent as ecs.Entity; // ecs.Entity 可转为当前模块的具体实体对象
// // this.on(ModuleEvent.Cmd, this.onHandler, this);
// }
type:number = 1;
value:string = "";
icon:string = "";
alive_time:number = 0.3;
start() {
switch(this.type){
case 1:
this.node.getChildByName("loss_life").getChildByName("hp").getComponent(Label).string = this.value;
this.node.getChildByName("loss_life").active=true;
case 2:
this.node.getChildByName("add_life").getChildByName("hp").getComponent(Label).string = this.value;
this.node.getChildByName("add_life").active=true;
break
case 3:
resources.load("game/heros/skill/"+this.icon, SpriteFrame, (err, spriteFrame) => {
this.node.getChildByName("skill").getChildByName("icon").getComponent(Sprite).spriteFrame = spriteFrame;
});
this.node.getChildByName("skill").active=true;
break
}
}
update(deltaTime: number) {
this.node.setPosition(v3(this.node.position.x,this.node.position.y+deltaTime*10))
if(this.alive_time >=0){
this.alive_time -= deltaTime;
}else{
this.ent.destroy();
}
}
/** 视图对象通过 ecs.Entity.remove(ModuleViewComp) 删除组件是触发组件处理自定义释放逻辑 */
reset() {
this.node.destroy();
}
}

View File

@@ -0,0 +1,9 @@
{
"ver": "4.0.23",
"importer": "typescript",
"imported": true,
"uuid": "49ffd76d-7069-4947-b170-62cd72619ede",
"files": [],
"subMetas": {},
"userData": {}
}