dd 56卡牌栏 为role 专有物品,不在有针对小兵的 卡牌技能, 小兵的强化靠role,没有驻场 技能,role 修改为多技能

This commit is contained in:
2024-09-12 17:19:14 +08:00
parent 5f1b081374
commit f80115e251
47 changed files with 1191 additions and 1524 deletions

View File

@@ -59,8 +59,8 @@ export class RoleViewComp extends CCComp {
skill_name: string = "base"; //技能名称
max_skill_name: string = "base"; //大技能名称
skill_uuid:number = 9001;
max_skill_uuid:number = 1001;
skill_uuid:number = 9002;
max_skill_uuid:number = 9002;
atk: number = 10; /**攻击力 */
// atk_speed: number = 1;
atk_cd: number = 1.3; /**攻击速度 攻击间隔 */

View File

@@ -24,6 +24,11 @@ export class SingletonModuleComp extends ecs.Comp {
cards: any = [
{uuid:9001,type:1},{uuid:9011,type:1},{uuid:9021,type:1},{uuid:9031,type:1},{uuid:9041,type:1}
];
items: any = [
{uuid:1001,type:2},{uuid:1002,type:2},{uuid:4011,type:2},{uuid:4012,type:2},
{uuid:6210,type:3},{uuid:6211,type:3},{uuid:6005,type:3},{uuid:6006,type:3},{uuid:6101,type:3},{uuid:6102,type:3},
];
player_skills: any = [
];
player_buffs: any = [

View File

@@ -1,33 +0,0 @@
export const MonSet={
1001:{uuid: 1001,path: "ge1",type: 1,level: 1,name: "战斗哥",atk: 4,hp: 30,atk_dis:40,atk_cd: 2,power: 50,speed: 30,
skill: "base",max_skill: "base",skill_uuid: 9001,max_skill_uuid: 1001,word: "守护",info: "自身护盾", atktype: "攻击型",mon: "orc"},
1002:{uuid: 1002,path: "ge2",type: 1,level: 1,name: "墨西哥",atk: 4,hp: 30,atk_dis:40,atk_cd: 2,power: 50,speed: 30,
skill: "base",max_skill: "base",skill_uuid: 9001,max_skill_uuid: 1001,word: "守护",info: "自身护盾", atktype: "攻击型",mon: "orc"},
1003:{uuid: 1003,path: "ge3",type: 1,level: 1,name: "铁头哥",atk: 4,hp: 30,atk_dis:40,atk_cd: 2,power: 50,speed: 30,
skill: "base",max_skill: "base",skill_uuid: 9001,max_skill_uuid: 1001,word: "守护",info: "自身护盾", atktype: "攻击型",mon: "orc"},
1011:{uuid: 1011,path: "orc1",type: 1,level: 1,name: "森林兽人",atk: 4,hp: 30,atk_dis:40,atk_cd: 2,power: 50,speed: 30,
skill: "base",max_skill: "base",skill_uuid: 9001,max_skill_uuid: 1001,word: "守护",info: "自身护盾", atktype: "攻击型",mon: "orc"},
1012:{uuid: 1012,path: "orc2",type: 1,level: 1,name: "荒野兽人",atk: 4,hp: 30,atk_dis:40,atk_cd: 2,power: 50,speed: 30,
skill: "base",max_skill: "base",skill_uuid: 9001,max_skill_uuid: 1001,word: "守护",info: "自身护盾", atktype: "攻击型",mon: "orc"},
1013:{uuid: 1013,path: "orc3",type: 1,level: 1,name: "兽人战士",atk: 4,hp: 30,atk_dis:40,atk_cd: 2,power: 50,speed: 30,
skill: "base",max_skill: "base",skill_uuid: 9001,max_skill_uuid: 1001,word: "守护",info: "自身护盾", atktype: "攻击型",mon: "orc"},
1021:{uuid: 1021,path: "gou1",type: 1,level: 1,name: "黄皮豺狼",atk: 4,hp: 30,atk_dis:40,atk_cd: 2,power: 50,speed: 30,
skill: "base",max_skill: "base",skill_uuid: 9001,max_skill_uuid: 1001,word: "守护",info: "自身护盾", atktype: "攻击型",mon: "gou"},
1022:{uuid: 1022,path: "gou2",type: 1,level: 1,name: "白皮豺狼",atk: 4,hp: 30,atk_dis:40,atk_cd: 2,power: 50,speed: 30,
skill: "base",max_skill: "base",skill_uuid: 9001,max_skill_uuid: 1001,word: "守护",info: "自身护盾", atktype: "攻击型",mon: "gou"},
1023:{uuid: 1023,path: "gou3",type: 1,level: 1,name: "灰皮豺狼",atk: 4,hp: 30,atk_dis:40,atk_cd: 2,power: 50,speed: 30,
skill: "base",max_skill: "base",skill_uuid: 9001,max_skill_uuid: 1001,word: "守护",info: "自身护盾", atktype: "攻击型",mon: "gou"},
1031:{uuid: 1031,path: "gou1",type: 1,level: 1,name: "独眼巨人",atk: 4,hp: 30,atk_dis:40,atk_cd: 2,power: 50,speed: 30,
skill: "base",max_skill: "base",skill_uuid: 9001,max_skill_uuid: 1001,word: "守护",info: "自身护盾", atktype: "攻击型",mon: "gou"},
1032:{uuid: 1032,path: "gou2",type: 1,level: 1,name: "狂暴独眼",atk: 4,hp: 30,atk_dis:40,atk_cd: 2,power: 50,speed: 30,
skill: "base",max_skill: "base",skill_uuid: 9001,max_skill_uuid: 1001,word: "守护",info: "自身护盾", atktype: "攻击型",mon: "gou"},
1033:{uuid: 1033,path: "gou3",type: 1,level: 1,name: "独眼首领",atk: 4,hp: 30,atk_dis:40,atk_cd: 2,power: 50,speed: 30,
skill: "base",max_skill: "base",skill_uuid: 9001,max_skill_uuid: 1001,word: "守护",info: "自身护盾", atktype: "攻击型",mon: "gou"},
1041:{uuid: 1041,path: "ys1",type: 1,level: 1,name: "火元素",atk: 4,hp: 30,atk_dis:400,atk_cd: 2,power: 50,speed: 30,
skill: "base",max_skill: "base",skill_uuid: 9001,max_skill_uuid: 1001,word: "守护",info: "自身护盾", atktype: "攻击型",mon: "gou"},
1042:{uuid: 1042,path: "ys2",type: 1,level: 1,name: "冰元素",atk: 4,hp: 30,atk_dis:400,atk_cd: 2,power: 50,speed: 30,
skill: "base",max_skill: "base",skill_uuid: 9001,max_skill_uuid: 1001,word: "守护",info: "自身护盾", atktype: "攻击型",mon: "ys"},
1043:{uuid: 1043,path: "ys3",type: 1,level: 1,name: "气元素",atk: 4,hp: 30,atk_dis:400,atk_cd: 2,power: 50,speed: 30,
skill: "base",max_skill: "base",skill_uuid: 9001,max_skill_uuid: 1001,word: "守护",info: "自身护盾", atktype: "攻击型",mon: "ys"},
}

View File

@@ -1,9 +0,0 @@
{
"ver": "4.0.23",
"importer": "typescript",
"imported": true,
"uuid": "42f65183-72b1-4150-a850-00ff62389bbd",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@@ -24,47 +24,41 @@ path: 图片地址
export const SkillSet={
1001:{uuid: 1001,path: "1001",type: 1,level: 1,name: "火球术",sp_name:"fire",info:"释放一个火球术攻击敌人",
dis:720,count:1,atk:10,hp:0,shield:0,sd:10,cd:1,bsd:10,bcd:1,sk_uuid:1001,sk_count:0,speed:350, },
dis:720,count:1,atk:10,hp:0,shield:0,sd:10,cd:1,bsd:0,bcd:0,sk_uuid:1001,sk_count:0,speed:350, },
1002:{uuid: 1002,path: "1002",type: 1,level: 1,name: "寒冰箭",sp_name:"ice",info:"释放一个寒冰箭攻击敌人",
dis:720,count:1,atk:10,hp:0,shield:0,sd:10,cd:1,bsd:10,bcd:1,sk_uuid:1001,sk_count:0,speed:350, },
dis:720,count:1,atk:10,hp:0,shield:0,sd:10,cd:1,bsd:0,bcd:0,sk_uuid:1001,sk_count:0,speed:350, },
4011:{uuid: 4011,path: "1011",type: 1,level: 3,name: "火焰风暴",sp_name:"fire",info:"释放多个个火球术攻击敌人",
dis:720,count:5,atk:10,hp:0,shield:0,sd:10,cd:1,bsd:10,bcd:1,sk_uuid:1001,sk_count:0,speed:350, },
dis:720,count:5,atk:10,hp:0,shield:0,sd:10,cd:2,bsd:0,bcd:0,sk_uuid:1001,sk_count:0,speed:350, },
4012:{uuid: 4012,path: "1012",type: 1,level: 3,name: "冰晶风暴",sp_name:"ice",info:"释放多个个寒冰箭攻击敌人",
dis:720,count:5,atk:10,hp:0,shield:0,sd:10,cd:1,bsd:10,bcd:1,sk_uuid:1001,sk_count:0,speed:350, },
9001:{uuid: 9001,path: "1001",type: 1,level: 1,name: "魔法波动",sp_name:"base",info:"释放一个魔法球攻击敌人",
dis:720,count:1,atk:0,hp:0,shield:0,sd:10,cd:3,bsd:10,bcd:1,sk_uuid:1001,sk_count:0,speed:450,},
9002:{uuid: 9002,path: "1001",type: 1,level: 1,name: "魔法波动",sp_name:"base2",info:"释放一个魔法球攻击敌人",
dis:720,count:1,atk:0,hp:0,shield:0,sd:10,cd:3,bsd:10,bcd:1,sk_uuid:1001,sk_count:0,speed:450,},
9003:{uuid: 9003,path: "1001",type: 2,level: 1,name: "魔法波动",sp_name:"base3",info:"释放一个魔法球攻击敌人",
dis:720,count:1,atk:0,hp:0,shield:0,sd:10,cd:3,bsd:10,bcd:1,sk_uuid:1001,sk_count:0,speed:450,},
dis:720,count:5,atk:10,hp:0,shield:0,sd:10,cd:2,bsd:0,bcd:0,sk_uuid:1001,sk_count:0,speed:350, },
9001:{uuid: 9001,path: "1001",type: 1,level: 1,name: "精准打击",sp_name:"patk",info:"释放一个魔法球攻击敌人",
dis:720,count:1,atk:0,hp:0,shield:0,sd:0,cd:0,bsd:0,bcd:0,sk_uuid:1001,sk_count:0,speed:450,},
9002:{uuid: 9002,path: "1001",type: 1,level: 1,name: "魔法",sp_name:"mball",info:"释放一个魔法球攻击敌人",
dis:720,count:1,atk:0,hp:0,shield:0,sd:0,cd:0,bsd:0,bcd:0,sk_uuid:1001,sk_count:0,speed:450,},
9003:{uuid: 9003,path: "1001",type: 1,level: 1,name: "精准射击",sp_name:"arrow",info:"释放一个魔法球攻击敌人",
dis:720,count:1,atk:0,hp:0,shield:0,sd:0,cd:0,bsd:0,bcd:0,sk_uuid:1001,sk_count:0,speed:450,},
6001:{uuid: 6001,path: "6001",type: 92,level: 1,name: "普通单手剑",sp_name:"",info:"",
6210:{uuid: 6210,path: "6210",type: 92,level: 1,name: "普通攻击石",sp_name:"",info:"",
dis:720,count:1,atk:10,hp:0,shield:0,sd:30,cd:1,bsd:5,bcd:1,sk_uuid:1001,sk_count:0,speed:350, },
6002:{uuid: 6002,path: "6002",type: 93,level: 3,name: "精致单手剑",sp_name:"",info:"",
6211:{uuid: 6211,path: "6211",type: 93,level: 3,name: "精炼攻击石",sp_name:"",info:"",
dis:720,count:1,atk:10,hp:0,shield:0,sd:30,cd:1,bsd:5,bcd:1,sk_uuid:1001,sk_count:0,speed:350, },
6003:{uuid: 6003,path: "6003",type: 94,level: 3,name: "魔法单手剑",sp_name:"",info:"",
dis:720,count:1,atk:10,hp:0,shield:0,sd:30,cd:1,bsd:5,bcd:1,sk_uuid:1001,sk_count:0,speed:350, },
6004:{uuid: 6004,path: "6004",type: 92,level: 1,name: "普通木盾",sp_name:"",info:"",
dis:720,count:1,atk:0,hp:0,shield:30,sd:30,cd:1,bsd:5,bcd:1,sk_uuid:1001,sk_count:0,speed:350, },
6005:{uuid: 6005,path: "6005",type: 93,level: 3,name: "精致钢盾",sp_name:"",info:"",
6005:{uuid: 6005,path: "6005",type: 93,level: 3,name: "钢盾",sp_name:"",info:"",
dis:720,count:1,atk:0,hp:0,shield:30,sd:30,cd:1,bsd:5,bcd:1,sk_uuid:1001,sk_count:0,speed:350, },
6006:{uuid: 6006,path: "6006",type: 94,level: 3,name: "魔法盾",sp_name:"",info:"",
dis:720,count:1,atk:0,hp:0,shield:30,sd:30,cd:1,bsd:5,bcd:1,sk_uuid:1001,sk_count:0,speed:350, },
6101:{uuid: 6101,path: "6101",type: 91,level: 1,name: "初级药水",sp_name:"",info:"",
dis:720,count:1,atk:0,hp:30,shield:0,sd:30,cd:1,bsd:5,bcd:1,sk_uuid:1001,sk_count:0,speed:350, },
dis:720,count:1,atk:0,hp:30,shield:0,sd:30,cd:5,bsd:5,bcd:1,sk_uuid:1001,sk_count:0,speed:350, },
6102:{uuid: 6102,path: "6102",type: 93,level: 3,name: "高级药水",sp_name:"",info:"",
dis:720,count:1,atk:0,hp:50,shield:0,sd:30,cd:1,bsd:5,bcd:1,sk_uuid:1001,sk_count:0,speed:350, },
dis:720,count:1,atk:0,hp:50,shield:0,sd:30,cd:5,bsd:5,bcd:1,sk_uuid:1001,sk_count:0,speed:350, },
6103:{uuid: 6103,path: "6103",type: 94,level: 3,name: "活力药水",sp_name:"",info:"",
dis:720,count:1,atk:0,hp:0,shield:0,sd:30,cd:1,bsd:5,bcd:1,sk_uuid:1001,sk_count:0,speed:350, },
}
export const AllItems={
6210:{uuid: 6210,path: "6210",type: 92,level: 3,name: "普通攻击石",sp_name:"",info:"",
dis:720,count:1,atk:0,hp:30,shield:0,sd:30,cd:1,bsd:0,bcd:1,sk_uuid:1001,sk_count:0,speed:350, },
@@ -91,10 +85,5 @@ export const SkillSet={
6218:{uuid: 6218,path: "6218",type: 94,level: 4,name: "精炼全能石",sp_name:"",info:"",
dis:720,count:1,atk:5,hp:30,shield:0,sd:30,cd:1,bsd:0,bcd:1,sk_uuid:1001,sk_count:0,speed:350, },
}
export const AllItems={
}

View File

@@ -1,20 +1,52 @@
export const HeroSet={
9001:{uuid: 9001,path: "k3",type: 1,level: 1,name: "战士",atk: 4,hp: 350,atk_dis:40,atk_cd: 2,power:0,power_max: 10,speed: 30,
skill: "base",max_skill: "base",skill_uuid: 9001,max_skill_uuid: 1001,word: "守护",info: "自身护盾", atktype: 1,},
9011:{uuid: 9004,path: "m1",type: 1,level: 1,name: "冰法",atk: 4,hp: 15,atk_dis:400,atk_cd: 2,power:0,power_max: 10,speed: 30,
skill: "base2",max_skill: "ice",skill_uuid: 9001,max_skill_uuid: 1002, atktype: 1,},
9021:{uuid: 9005,path: "m2",type: 3,level: 1,name: "火法",atk: 6,hp: 15,atk_dis:400,atk_cd: 2,power:0,power_max: 10,speed: 30,
skill: "base2",max_skill: "fire",skill_uuid: 9001,max_skill_uuid: 1001, atktype: 2},
9031:{uuid: 9006,path: "m3",type: 3,level: 1,name: "牧师",atk: 3,hp: 20,atk_dis:400,atk_cd: 2,power:0,power_max: 10,speed: 30,
skill: "base2",max_skill: "base2",skill_uuid: 9001,max_skill_uuid: 1001,word: "守护",info: "自身护盾", atktype: 2},
9041:{uuid: 9009,path: "arc1",type: 3,level: 1,name: "弓箭手",atk: 3,hp: 15,atk_dis:400,atk_cd: 1,power:0,power_max: 10,speed: 30,
skill: "base3",max_skill: "base3",skill_uuid: 9001,max_skill_uuid: 1001,word: "狂暴",info: "全体攻击", atktype: 2},
9001:{uuid:9001,path:"k3",type:1,level:1,name:"战士",atk:4,hp: 350,atk_dis:40,atk_cd:2,power:0,power_max: 10,speed: 30,
max_skill: "精准打击",skill_uuid:9001,max_skill_uuid:9001,word: "守护",info: "自身护盾", atktype:1,},
9011:{uuid:9004,path:"m1",type:1,level:1,name:"冰法",atk:4,hp: 15,atk_dis:200,atk_cd:2,power:0,power_max: 10,speed: 30,
max_skill: "寒冰箭",skill_uuid:9002,max_skill_uuid:1002,word: "守护",info: "自身护盾",atktype:1,},
9021:{uuid:9006,path:"m3",type:3,level:1,name:"火法",atk:6,hp: 15,atk_dis:200,atk_cd:2,power:0,power_max: 10,speed: 30,
max_skill: "火球术",skill_uuid:9002,max_skill_uuid:1001,word: "守护",info: "自身护盾", atktype:2},
9031:{uuid:9005,path:"m2",type:3,level:1,name:"牧师",atk:3,hp: 20,atk_dis:200,atk_cd:2,power:0,power_max: 10,speed: 30,
max_skill: "治愈术",skill_uuid:9002,max_skill_uuid:9002,word: "守护",info: "自身护盾", atktype:2},
9041:{uuid:9009,path:"arc1",type:3,level:1,name:"弓箭手",atk:3,hp: 15,atk_dis:300,atk_cd:1,power:0,power_max: 10,speed: 30,
max_skill: "精准射击",skill_uuid:9003,max_skill_uuid:9003,word: "狂暴",info: "全体攻击", atktype:2},
}
export const MonSet={
1001:{uuid:1001,path:"ge1",type:1,level:1,name:"战斗哥",atk:4,hp: 30,atk_dis:40,atk_cd:2,power:0,power_max:10,speed:30,
max_skill: "精准打击",skill_uuid:9001,max_skill_uuid:9001,word: "守护",info: "自身护盾", atktype:1},
1002:{uuid:1002,path:"ge2",type:1,level:1,name:"墨西哥",atk:4,hp: 30,atk_dis:40,atk_cd:2,power:0,power_max:10,speed:30,
max_skill: "精准打击",skill_uuid:9001,max_skill_uuid:9001,word: "守护",info: "自身护盾", atktype:1},
1003:{uuid:1003,path:"ge3",type:1,level:1,name:"铁头哥",atk:4,hp: 30,atk_dis:40,atk_cd:2,power:0,power_max:10,speed:30,
max_skill: "精准打击",skill_uuid:9001,max_skill_uuid:9001,word: "守护",info: "自身护盾", atktype:1},
1011:{uuid:1011,path:"orc1",type:1,level:1,name:"森林兽人",atk:4,hp: 30,atk_dis:40,atk_cd:2,power:0,power_max:10,speed:30,
max_skill: "精准打击",skill_uuid:9001,max_skill_uuid:9001,word: "守护",info: "自身护盾", atktype:1},
1012:{uuid:1012,path:"orc2",type:1,level:1,name:"荒野兽人",atk:4,hp: 30,atk_dis:40,atk_cd:2,power:0,power_max:10,speed:30,
max_skill: "精准打击",skill_uuid:9001,max_skill_uuid:9001,word: "守护",info: "自身护盾", atktype:1},
1013:{uuid:1013,path:"orc3",type:1,level:1,name:"兽人战士",atk:4,hp: 30,atk_dis:40,atk_cd:2,power:0,power_max:10,speed:30,
max_skill: "精准打击",skill_uuid:9001,max_skill_uuid:9001,word: "守护",info: "自身护盾", atktype:1},
1021:{uuid:1021,path:"gou1",type:1,level:1,name:"黄皮豺狼",atk:4,hp: 30,atk_dis:40,atk_cd:2,power:0,power_max:10,speed:30,
max_skill: "精准打击",skill_uuid:9001,max_skill_uuid:9001,word: "守护",info: "自身护盾", atktype:1},
1022:{uuid:1022,path:"gou2",type:1,level:1,name:"白皮豺狼",atk:4,hp: 30,atk_dis:40,atk_cd:2,power:0,power_max:10,speed:30,
max_skill: "精准打击",skill_uuid:9001,max_skill_uuid:9001,word: "守护",info: "自身护盾", atktype:1},
1023:{uuid:1023,path:"gou3",type:1,level:1,name:"灰皮豺狼",atk:4,hp: 30,atk_dis:40,atk_cd:2,power:0,power_max:10,speed:30,
max_skill: "精准打击",skill_uuid:9001,max_skill_uuid:9001,word: "守护",info: "自身护盾", atktype:1},
1031:{uuid:1031,path:"gou1",type:1,level:1,name:"独眼巨人",atk:4,hp: 30,atk_dis:40,atk_cd:2,power:0,power_max:10,speed:30,
max_skill: "精准打击",skill_uuid:9001,max_skill_uuid:9001,word: "守护",info: "自身护盾", atktype:1},
1032:{uuid:1032,path:"gou2",type:1,level:1,name:"狂暴独眼",atk:4,hp: 30,atk_dis:40,atk_cd:2,power:0,power_max:10,speed:30,
max_skill: "精准打击",skill_uuid:9001,max_skill_uuid:9001,word: "守护",info: "自身护盾", atktype:1},
1033:{uuid:1033,path:"gou3",type:1,level:1,name:"独眼首领",atk:4,hp: 30,atk_dis:40,atk_cd:2,power:0,power_max:10,speed:30,
max_skill: "精准打击",skill_uuid:9001,max_skill_uuid:9001,word: "守护",info: "自身护盾", atktype:1},
1041:{uuid:1041,path:"ys1",type:1,level:1,name:"火元素",atk:4,hp: 30,atk_dis:200,atk_cd:2,power:0,power_max:10,speed:30,
max_skill: "火球术",skill_uuid:9002,max_skill_uuid:1001,word: "守护",info: "自身护盾", atktype:2},
1042:{uuid:1042,path:"ys2",type:1,level:1,name:"冰元素",atk:4,hp: 30,atk_dis:200,atk_cd:2,power:0,power_max:10,speed:30,
max_skill: "寒冰箭",skill_uuid:9002,max_skill_uuid:1002,word: "守护",info: "自身护盾", atktype:2},
1043:{uuid:1043,path:"ys3",type:1,level:1,name:"气元素",atk:4,hp: 30,atk_dis:200,atk_cd:2,power:0,power_max:10,speed:30,
max_skill: "魔法球",skill_uuid:9002,max_skill_uuid:9002,word: "守护",info: "自身护盾", atktype:2},
}

View File

@@ -16,8 +16,7 @@ import { HeroSpine } from "./HeroSpine";
import { HeroViewComp } from "./HeroViewComp";
import { BoxSet } from "../common/config/BoxSet";
import { RandomManager } from "../../../../extensions/oops-plugin-framework/assets/core/common/random/RandomManager";
import { HeroSet } from "../common/config/heroSet";
import { MonSet } from "../common/config/MonSet";
import { HeroSet,MonSet } from "../common/config/heroSet";
/** 角色实体 */
@ecs.register(`Hero`)
export class Hero extends ecs.Entity {
@@ -83,7 +82,7 @@ export class Hero extends ecs.Entity {
mv.power = smc.heros[uuid].power;
mv.power_max= smc.heros[uuid].power_max;
mv.type = smc.heros[uuid].type;
mv.skill_uuid = 9001;
mv.skill_uuid = smc.heros[uuid].skill_uuid;
mv.max_skill_uuid = smc.heros[uuid].max_skill_uuid;
mv.scale = 1;
mv.Tpos = v3(0,0,0);

View File

@@ -85,6 +85,7 @@ export class HeroViewComp extends CCComp {
buff_shields:any=[];
buff_atks:any = [];
dir_y:number = 0;
onLoad() {
this.as = this.getComponent(HeroSpine);
@@ -94,7 +95,7 @@ export class HeroViewComp extends CCComp {
start () {
this.as.move()
this.sprite = this.node.getChildByName("anm").getComponent(Sprite);
this.node.getChildByName("top").getChildByName("shield").active = false;
// this.node.getChildByName("top").getChildByName("shield").active = false;
// this.node.getChildByName("top").setScale(this.scale,1);
// this.node.getChildByName("atk").setScale(this.scale,1);
// this.node.getChildByName("atk").getComponent(Label).string = this.atk.toString();
@@ -173,7 +174,11 @@ export class HeroViewComp extends CCComp {
if(this.enemy){
return
}
this.node.setPosition(this.node.position.x+dt*this.speed*this.scale, this.node.position.y, this.node.position.z);
this.set_diry()
this.node.setPosition(this.node.position.x+dt*this.speed*this.scale, this.node.position.y+dt*this.dir_y, this.node.position.z);
}
set_diry(){
this.dir_y=-(this.node.position.y-BoxSet.GAME_LINE)/60
}
move_to(){
var move = this.ent.get(MoveToComp) || this.ent.add(MoveToComp);
@@ -221,10 +226,10 @@ export class HeroViewComp extends CCComp {
},0.5)
this.power = 0
}
let power_progress= this.power/this.power_max;
this.node.getChildByName("top").getChildByName("power").getComponent(ProgressBar)!.progress = power_progress;
// let power_progress= this.power/this.power_max;
// this.node.getChildByName("top").getChildByName("power").getComponent(ProgressBar)!.progress = power_progress;
}
shoot(skill_uuid:number){
shoot(skill_uuid:number,y:number=0){
// console.log("mon shoot");
let skill = ecs.getEntity<Skill>(Skill);
let scale = this.scale
@@ -232,11 +237,19 @@ export class HeroViewComp extends CCComp {
let dis = smc.skills[skill_uuid].dis;
let atk = smc.skills[skill_uuid].atk+this.atk;
let {pos,angle,t_pos}=this.get_enemy_pos()
pos.y=pos.y + y
skill.load(pos,speed,dis,scale,this.node,skill_uuid,atk,angle,t_pos);
// this.tooltip(3,smc.skills[skill_uuid].name,this.skill_uuid);
}
//使用max_skill
do_max_skill(){
if(this.max_skill_uuid==this.skill_uuid){
this.shoot(this.max_skill_uuid,10)
this.shoot(this.max_skill_uuid,0)
this.shoot(this.max_skill_uuid,-10)
return
}
let skill = ecs.getEntity<Skill>(Skill);
let scale = this.scale
let speed =smc.skills[this.max_skill_uuid].speed;
@@ -255,7 +268,7 @@ export class HeroViewComp extends CCComp {
console.log("move_to",this.enemy.isValid);
return
}
t_pos = v3(this.enemy.position.x-(this.node.position.x+pos.x),this.enemy.position.y-(this.node.position.y+pos.y)+BoxSet.ATK_Y)
t_pos = v3(this.enemy.position.x-(this.node.position.x),this.enemy.position.y-(this.node.position.y+pos.y)+BoxSet.ATK_Y)
angle = Math.atan2(t_pos.y,t_pos.x) * 180 / Math.PI;
if(this.scale == -1){
angle = angle +180
@@ -373,16 +386,16 @@ export class HeroViewComp extends CCComp {
if(this.shield_time <= 0){
this.shield_time = 0;
this.shield = this.shield_max=0;
this.node.getChildByName("top").getChildByName("shield").active=false
// this.node.getChildByName("top").getChildByName("shield").active=false
}
let shield_progress= this.shield/this.shield_max;
this.node.getChildByName("top").getChildByName("shield").getComponent(ProgressBar)!.progress = shield_progress;
// let shield_progress= this.shield/this.shield_max;
// this.node.getChildByName("top").getChildByName("shield").getComponent(ProgressBar)!.progress = shield_progress;
}
if(this.shield <= 0){
this.shield_time=0
this.node.getChildByName("top").getChildByName("shield").active=false
// this.node.getChildByName("top").getChildByName("shield").active=false
}else{
this.node.getChildByName("top").getChildByName("shield").active=true
// this.node.getChildByName("top").getChildByName("shield").active=true
}
}
tooltip(type:number=1,value:string="",s_uuid:number=1001,y:number=60){
@@ -405,36 +418,21 @@ export class HeroViewComp extends CCComp {
}
}
in_destroy(){
// switch (this.scale) {
// case -1:
// if(this.node.position.x < BoxSet.LETF_END){
// this.toDestroy();
// }
// break;
// case 1:
// if(this.node.position.x > BoxSet.RIGHT_END){
// this.toDestroy();
// }
// break;
// }
}
in_atked() {
if(this.is_role){
var path = "game/skills/atked";
var prefab: Prefab = oops.res.get(path, Prefab)!;
var node = instantiate(prefab);
let pos = v3(0,60)
node.setPosition(pos)
node.parent = this.node;
// var path = "game/skills/atked";
// var prefab: Prefab = oops.res.get(path, Prefab)!;
// var node = instantiate(prefab);
// let pos = v3(0,60)
// node.setPosition(pos)
// node.parent = this.node;
this.sprite.setSharedMaterial(this.hitFlashMaterial, 0);
this.scheduleOnce(() => {
this.sprite.setSharedMaterial(this.orginalFlashMaterial, 0);
}, 0.1);
}else{
this.sprite.setSharedMaterial(this.hitFlashMaterial, 0);
this.scheduleOnce(() => {
this.sprite.setSharedMaterial(this.orginalFlashMaterial, 0);
}, 0.1);
}
}
dead(){

View File

@@ -12,9 +12,8 @@ import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ec
import { UIID } from "../common/config/GameUIConfig";
import { LoadingViewComp } from "./view/LoadingViewComp";
import { smc } from "../common/SingletonModuleComp";
import { HeroSet } from "../common/config/heroSet";
import { MonSet, HeroSet } from "../common/config/heroSet";
import { SkillSet } from "../common/config/SkillSet";
import { MonSet } from "../common/config/MonSet";
// import {data} from "../data/data";
/**

View File

@@ -4,7 +4,6 @@ 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 { CardList } from "../common/config/CardSet";
import { SkillSet } from "../common/config/SkillSet";
import { HeroModelComp } from "../hero/HeroModelComp";
const { ccclass, property } = _decorator;
@@ -229,10 +228,7 @@ export class CardControllerComp extends CCComp {
}
}
get_card_list(li:number){
let list = RandomManager.instance.getRandomByObjectList(CardList[li], 1);
return list
}
load_cards() {
this.in_load = true
let card:any=null
@@ -261,7 +257,7 @@ export class CardControllerComp extends CCComp {
this.cards[index].alive=true
}
for (let index = 5; index <= 6; index++) {
card=RandomManager.instance.getRandomByObjectList(CardList[index], 1);
card=RandomManager.instance.getRandomByObjectList(smc.items, 1);
this.cards[index].uuid=card[0].uuid
this.cards[index].type=card[0].type
let url: string = "";

View File

@@ -149,9 +149,9 @@ export class MapMonsterComp extends CCComp {
let m2:any = RandomManager.instance.getRandomByObjectList(this.mission_list[this.monster_level],1)
// console.log("刷怪",m)
var scene = smc.map.MapView.scene;
let pos:Vec3 = v3(BoxSet.MONSTER_START,BoxSet.GAME_LINE)
let pos1:Vec3 = v3(BoxSet.MONSTER_START,BoxSet.GAME_LINE+60)
let pos2:Vec3 = v3(BoxSet.MONSTER_START,BoxSet.GAME_LINE-60)
let pos:Vec3 = v3(BoxSet.MONSTER_START,BoxSet.GAME_LINE+RandomManager.instance.getRandomInt(-40,40, 1))
let pos1:Vec3 = v3(BoxSet.MONSTER_START,BoxSet.GAME_LINE+RandomManager.instance.getRandomInt(40,130, 1))
let pos2:Vec3 = v3(BoxSet.MONSTER_START,BoxSet.GAME_LINE-RandomManager.instance.getRandomInt(40,130, 1))
let monster_layer = scene.entityLayer!.node!
let monster_layer1 = scene.entityLayer1!.node!;
@@ -168,17 +168,17 @@ export class MapMonsterComp extends CCComp {
}
set_layer(start:number=0){
var scene = smc.map.MapView.scene;
let pos:Vec3 = v3(start,BoxSet.GAME_LINE)
let pos:Vec3 = v3(start,BoxSet.GAME_LINE+RandomManager.instance.getRandomInt(-40,40, 1));
let x = RandomManager.instance.getRandomInt(0,2, 2);
let monster_layer = scene.entityLayer!.node!
switch (x) {
case 1:
monster_layer = scene.entityLayer1!.node!;
pos.y=pos.y+80;
pos.y=pos.y+RandomManager.instance.getRandomInt(40,130, 1);
break;
case 2:
monster_layer= scene.entityLayer2!.node!;
pos.y=pos.y-80;
pos.y=pos.y-RandomManager.instance.getRandomInt(40,130, 1);
break;
}

View File

@@ -1,41 +0,0 @@
import { _decorator,v3 ,NodeEventType} 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";
import { oops } from "../../../../extensions/oops-plugin-framework/assets/core/Oops";
import { HeroCard } from "../monster/HeroCard";
import { HeroCardViewComp } from "../monster/HeroCardViewComp";
import { RandomManager } from "../../../../extensions/oops-plugin-framework/assets/core/common/random/RandomManager";
import { CardList } from "../common/config/CardSet";
const { ccclass, property } = _decorator;
/** 视图层对象 */
@ccclass('RefControllerComp')
@ecs.register('RefController', false)
export class RefControllerComp extends CCComp {
card_level = 1;
protected onLoad(): void {
}
start() {
}
protected update(dt: number): void {
}
reset() {
this.node.destroy();
}
onTouch(){
}
}

View File

@@ -1 +0,0 @@
{"ver":"4.0.23","importer":"typescript","imported":true,"uuid":"6527b285-9d12-416e-8963-5e39820b7d4e","files":[],"subMetas":{},"userData":{}}

View File

@@ -3,8 +3,6 @@ import { ecs } from "../../../../../extensions/oops-plugin-framework/assets/libs
import { CCComp } from "../../../../../extensions/oops-plugin-framework/assets/module/common/CCComp";
import { smc } from "../../common/SingletonModuleComp";
import { BoxSet } from "../../common/config/BoxSet";
import { Hero } from "../../monster/Hero";
import { Monster } from "../../monster/Monster";
import { MapViewScene } from "./MapViewScene";
import { Timer } from "../../../../../extensions/oops-plugin-framework/assets/core/common/timer/Timer";
import { oops } from "../../../../../extensions/oops-plugin-framework/assets/core/Oops";
@@ -51,13 +49,6 @@ export class MapViewComp extends CCComp {
gold_add(dt: number) {
smc.vm_data.gold.time += dt;
if (smc.vm_data.gold.time >= smc.vm_data.gold.cd) {
// if (smc.vm_data.gold.max < smc.vm_data.gold.max_limit) {
// smc.vm_data.gold.max += 1;
// }
// smc.vm_data.gold.min = smc.vm_data.gold.max;
// if(smc.vm_data.gold.min < smc.vm_data.gold.max){
// smc.vm_data.gold.min += 1;
// }
smc.vm_data.gold.min += 1;
smc.vm_data.gold.time = 0;
}

View File

@@ -16,9 +16,7 @@ import { MonSpine } from "./MonSpine";
import { MonViewComp } from "./MonViewComp";
import { BoxSet } from "../common/config/BoxSet";
import { RandomManager } from "../../../../extensions/oops-plugin-framework/assets/core/common/random/RandomManager";
import { MonBuffComp } from "./MonBuffComp";
import { HeroSet } from "../common/config/heroSet";
import { MonSet } from "../common/config/MonSet";
import { HeroSet,MonSet } from "../common/config/heroSet";
/** 角色实体 */
@ecs.register(`Mon`)
export class Mon extends ecs.Entity {
@@ -26,7 +24,6 @@ export class Mon extends ecs.Entity {
MonModel!: MonModelComp;
// 视图层
MonView!: MonViewComp;
MonBuff!: MonBuffComp; // 移动
protected init() {
this.addComponents<ecs.Comp>( MonModelComp);
@@ -35,7 +32,6 @@ export class Mon extends ecs.Entity {
destroy(): void {
this.remove(MonViewComp);
this.remove(MonBuffComp);
super.destroy();
}
@@ -74,23 +70,22 @@ export class Mon extends ecs.Entity {
}
hero_init(uuid:number=1001,node:Node,pos:Vec3=v3(0,0,0)){
var mv = node.getComponent(MonViewComp)!;
var buff =node.getComponent(MonBuffComp)!;
// console.log("hero_init",buff)
mv.speed =mv.ospeed = smc.monsters[uuid].speed;
mv.hero_name= smc.monsters[uuid].name;
buff.group=mv.box_group= BoxSet.MONSTER;
mv.hp= mv.hp_max = smc.monsters[uuid].hp;
mv.level = smc.monsters[uuid].level;
mv.atk = smc.monsters[uuid].atk;
mv.atk_cd = smc.monsters[uuid].atk_cd;
mv.atk_dis = smc.monsters[uuid].atk_dis;
mv.power = smc.monsters[uuid].power;
mv.power_max = smc.monsters[uuid].power_max;
mv.type = smc.monsters[uuid].type;
mv.skill_uuid = 9001;
mv.skill_uuid = smc.monsters[uuid].skill_uuid;
mv.max_skill_uuid = smc.monsters[uuid].max_skill_uuid;
mv.scale = -1;
mv.Tpos = v3(0,0,0);
this.add(mv);
this.add(buff);
}
}

View File

@@ -19,7 +19,6 @@ import { Timer } from "../../../../extensions/oops-plugin-framework/assets/core/
import { SkillCom } from "../skills/SkillCom";
import { SkillSet } from "../common/config/SkillSet";
import { Tooltip } from "../skills/Tooltip";
import { MonBuffComp } from "./MonBuffComp";
import { MoveToComp } from "../common/ecs/position/MoveTo";
import { BoxRangComp } from "./BoxRangComp";
const { ccclass, property } = _decorator;
@@ -36,7 +35,6 @@ export class MonViewComp extends CCComp {
@property(Node)
BoxRang:Node =null!
buff:MonBuffComp =null!
is_role:boolean = false;
enemy_pos:Vec3=null!;
enemy:any=null!;
@@ -83,10 +81,11 @@ export class MonViewComp extends CCComp {
is_dead:boolean = false; //是否摧毁
is_stop:boolean = false;
is_atking:boolean = false;
buff_shields:any=[];
buff_atks:any = [];
dir_y:number = 0;
onLoad() {
this.as = this.getComponent(MonSpine);
this.buff=this.node.getComponent(MonBuffComp);
// this.BoxRang = this.node.getChildByName("range_box");
// this.BoxRang = this.node.getChildByName("range_box");
} /** 视图层逻辑代码分离演示 */
@@ -108,7 +107,6 @@ export class MonViewComp extends CCComp {
// this.enemy=smc.Role.RoleView.node
// // console.log("mon enemy ",this.enemy);
// }
this.buff.group=this.box_group
// 注册单个碰撞体的回调函数
let collider = this.getComponent(Collider2D);
collider.group = this.box_group;
@@ -170,7 +168,7 @@ export class MonViewComp extends CCComp {
this.power_change(this.power_speed)
}
this.in_destroy();
this.in_shield();
this.in_shield(dt);
this.in_stop(dt);
this.in_atk(dt);
this.move(dt);
@@ -193,9 +191,12 @@ export class MonViewComp extends CCComp {
// if(this.enemy){
// return
// }
this.node.setPosition(this.node.position.x+dt*this.speed*this.scale, this.node.position.y, this.node.position.z);
this.set_diry()
this.node.setPosition(this.node.position.x+dt*this.speed*this.scale, this.node.position.y+dt*this.dir_y, this.node.position.z);
}
move_to(){
set_diry(){
this.dir_y=-(this.node.position.y-BoxSet.GAME_LINE)/60
} move_to(){
var move = this.ent.get(MoveToComp) || this.ent.add(MoveToComp);
move.target = v3(smc.Role.RoleView.node.position.x+10,smc.Role.RoleView.node.position.y);
move.node = this.node;
@@ -241,8 +242,8 @@ export class MonViewComp extends CCComp {
},0.5)
this.power = 0
}
let power_progress= this.power/this.power_max;
this.node.getChildByName("top").getChildByName("power").getComponent(ProgressBar)!.progress = power_progress;
// let power_progress= this.power/this.power_max;
// this.node.getChildByName("top").getChildByName("power").getComponent(ProgressBar)!.progress = power_progress;
}
shoot(skill_uuid:number){
// console.log("mon shoot");
@@ -309,16 +310,7 @@ export class MonViewComp extends CCComp {
this.atk_time += dt;
}
}
in_shield(){
let shield_progress= this.shield/this.shield_max;
this.node.getChildByName("top").getChildByName("shield").getComponent(ProgressBar)!.progress = shield_progress;
// if(this.shield <= 0){
// this.node.getChildByName("shield").active=false
// }else{
// this.node.getChildByName("shield").active=true
// }
}
hp_change(hp: number){
if(this.is_dead){
return;
@@ -353,10 +345,36 @@ export class MonViewComp extends CCComp {
}
add_hp(hp: number=0){
console.log("hero 加血动画");
this.hp+=hp;
if(this.hp > this.hp_max){
this.hp = this.hp_max;
}
this.tooltip(2,hp.toString());
let hp_progress= this.hp/this.hp_max;
this.node.getChildByName("top").getChildByName("hp").getComponent(ProgressBar)!.progress = hp_progress;
}
add_atk(atk: number,time:number=0){
if(time > 0){
let buff={atk:atk,time:time}
this.buff_atks.push(buff);
}else{
this.atk += atk;
}
}
check_buff_atks(dt: number){
for(let i=0;i<this.buff_atks.length;i++){
let buff=this.buff_atks[i];
buff.time -= dt;
if(buff.time <= 0){
if(buff.atk > 0)this.atk -= buff.atk;
this.buff_atks.splice(i,1);
}
}
}
add_shield(shield: number,time:number=0){
this.shield =this.shield_max=shield
this.shield_time = time;
}
shield_change(hp: number){
let ls=this.shield - hp;
if(ls <= 0){
@@ -367,6 +385,27 @@ export class MonViewComp extends CCComp {
return 0;
}
}
in_shield(dt){
if(this.shield_time <= 0){
return
}
if(this.shield_time > 0){
this.shield_time -= dt;
if(this.shield_time <= 0){
this.shield_time = 0;
this.shield = this.shield_max=0;
// this.node.getChildByName("top").getChildByName("shield").active=false
}
// let shield_progress= this.shield/this.shield_max;
// this.node.getChildByName("top").getChildByName("shield").getComponent(ProgressBar)!.progress = shield_progress;
}
if(this.shield <= 0){
this.shield_time=0
// this.node.getChildByName("top").getChildByName("shield").active=false
}else{
// this.node.getChildByName("top").getChildByName("shield").active=true
}
}
tooltip(type:number=1,value:string="",s_uuid:number=1001){
// console.log("tooltip",type);
let tip =ecs.getEntity<Tooltip>(Tooltip);
@@ -401,23 +440,12 @@ export class MonViewComp extends CCComp {
// }
}
in_atked() {
if(this.is_role){
var path = "game/skills/atked";
var prefab: Prefab = oops.res.get(path, Prefab)!;
var node = instantiate(prefab);
let pos = v3(0,60)
node.setPosition(pos)
node.parent = this.node;
in_atked() {
this.sprite.setSharedMaterial(this.hitFlashMaterial, 0);
this.scheduleOnce(() => {
this.sprite.setSharedMaterial(this.orginalFlashMaterial, 0);
}, 0.1);
}else{
this.sprite.setSharedMaterial(this.hitFlashMaterial, 0);
this.scheduleOnce(() => {
this.sprite.setSharedMaterial(this.orginalFlashMaterial, 0);
}, 0.1);
}
}
dead(){
var path = "game/skills/dead";

View File

@@ -21,7 +21,7 @@ export class TooltipCom extends CCComp {
value:string = "";
s_uuid:number = 1001;
alive_time:number = 1;
skill_name_time=1;
skill_name_time=0.5;
start() {
this.node.getChildByName("loss_life").active=false;
this.node.getChildByName("add_life").active=false
@@ -56,6 +56,7 @@ export class TooltipCom extends CCComp {
this.node.getChildByName("skill").getChildByName("name").getComponent(Label).string = smc.skills[this.s_uuid].name;
this.node.getChildByName("skill").active=true;
this.node.setPosition(v3(this.node.position.x,this.node.position.y+60))
// this.alive_time = 2
tween(this.node).to(
this.alive_time,