This commit is contained in:
2025-01-02 00:00:05 +08:00
parent 1df06c791f
commit fdec4ef47b
68 changed files with 63931 additions and 22650 deletions

View File

@@ -41,11 +41,16 @@ export class SingletonModuleComp extends ecs.Comp {
/** 游戏主角 */
heros:any={
5001:{uuid:5001,lv:1,exp:0,slv:1,num:100,x1:10},
5002:{uuid:5002,lv:2,exp:0,slv:1,num:80,x1:0},
5003:{uuid:5003,lv:3,exp:0,slv:1,num:90,x1:0},
5004:{uuid:5004,lv:1,exp:0,slv:0,num:100,x1:0},
5002:{uuid:5002,lv:2,exp:0,slv:0,num:80,x1:0},
5003:{uuid:5003,lv:3,exp:0,slv:0,num:90,x1:0},
5004:{uuid:5004,lv:1,exp:0,slv:1,num:100,x1:0},
5005:{uuid:5005,lv:2,exp:0,slv:0,num:80,x1:0},
5006:{uuid:5006,lv:3,exp:0,slv:0,num:90,x1:0},
5007:{uuid:5007,lv:3,exp:0,slv:0,num:90,x1:0},
5008:{uuid:5008,lv:3,exp:0,slv:0,num:90,x1:0},
5009:{uuid:5009,lv:3,exp:0,slv:0,num:90,x1:0},
5010:{uuid:5010,lv:3,exp:0,slv:0,num:90,x1:0},
5011:{uuid:5011,lv:3,exp:0,slv:0,num:90,x1:0},
};
goods:any=[
{uuid:9001,num:100000,type:0,cost:0,inventory:5},
@@ -71,7 +76,7 @@ export class SingletonModuleComp extends ecs.Comp {
1015:{uuid:1015,num:1000,x1:0},
1016:{uuid:1016,num:1000,x1:0},
};
fight_heros=[5001,5002]
fight_heros=[5001]
mheros:any = [];
monsters:any = [];
sk_info:any = []

View File

@@ -51,4 +51,9 @@ export enum GameSet {
COIN_ADD=1,
DEF_RATE=0.5,
HERO_NUM=3,
}
}
export const ColorSet: { [key: string]: string } = {
RED: "ff364d",
BLUE: "04b0f5",
YELLOW: "fed64f"
};

View File

@@ -42,11 +42,14 @@ import { Talents } from "./TalentSet"
* dgr 闪避触发sk3机率
* crr 暴击触发sk3机率
* crc 暴击触发sk3需要次数
*
* lv : 1 精英 2史诗 3 传说
* kind 1 火 2 水 3 气
**/
export const HeroInfo = {
//坦克, 高防 圣盾
//坦克, 高防 攻击时有可能冲击目标造成70% 攻击伤害
5001: {
uuid:5001,name: "盾战",path:"k1",type:0,hp: 2000, hp_up:10, shp_up:20,def:10,def_up:1,sdef_up:20,ap:20,ap_up:2,sap_up:20,atp:1,vun:0,crit:20,crit_add:0,ucr:0,dodge:0,dis:150,a_cd:1.5,
uuid:5001,name: "灰烬使者",path:"k1",quality:3,kind:1,type:0,hp: 2000, hp_up:10, shp_up:20,def:10,def_up:1,sdef_up:20,ap:20,ap_up:2,sap_up:20,atp:1,vun:0,crit:20,crit_add:0,ucr:0,dodge:0,dis:180,a_cd:1.5,
lvexp:0,slvexp:0,slv:0, speed: 100,aexp:5,uaexp:1,cexp:10,doexp:10,dexp:20,sk1:[6005,6005,6005,6005,6005,6005],sk2:[6102,6102,6102,6102,6102,6102],sk3:[6102,6102,6102,6102,6102,6102],pw:0,pwm:150,pws:10,apw:10,uapw:10,cpw:10,dpw:10,dopw:10,
akr:[10,20,30,40,50,60],akc:[1,1,1,1,1,1],uar:[10,20,30,40,50,60],uac:[1,1,1,1,1,1],dgr:[10,20,30,40,50,60],dgc:[1,1,1,1,1,1],crr:[10,20,30,40,50,60],crc:[1,1,1,1,1,1],
abh:0,abc:0,uabh:0,uabc:0,cbh:0,cbc:0,aua:0,auc:0,uaua:0,uauc:0,cua:0,cuc:0,wp:1001,arm:2001,ring:3001,shoes:4001,
@@ -54,44 +57,51 @@ export const HeroInfo = {
},
//坦克,高血量 ,回血
5002: {
uuid:5002,name: "自愈战",path:"k2",type:0,hp: 2000, hp_up:10, shp_up:20,def:10,def_up:1,sdef_up:20,ap:20,ap_up:2,sap_up:20,atp:1,vun:0,crit:20,crit_add:0,ucr:0,dodge:0,dis:150,a_cd:1.5,
uuid:5002,name: "自愈战",path:"k2",quality:2,kind:1,type:0,hp: 2000, hp_up:10, shp_up:20,def:10,def_up:1,sdef_up:20,ap:20,ap_up:2,sap_up:20,atp:1,vun:0,crit:20,crit_add:0,ucr:0,dodge:0,dis:180,a_cd:1.5,
lvexp:0,slvexp:0,slv:0, speed: 100,aexp:5,uaexp:1,cexp:10,doexp:10,dexp:20,sk1:[6005,6005,6005,6005,6005,6005],sk2:[6102,6102,6102,6102,6102,6102],sk3:[6102,6102,6102,6102,6102,6102],pw:0,pwm:150,pws:10,apw:0,uapw:0,cpw:0,dpw:0,dopw:0,
akr:[10,20,30,40,50,60],akc:[1,1,1,1,1,1],uar:[10,20,30,40,50,60],uac:[1,1,1,1,1,1],dgr:[10,20,30,40,50,60],dgc:[1,1,1,1,1,1],crr:[10,20,30,40,50,60],crc:[1,1,1,1,1,1],
abh:0,abc:0,uabh:0,uabc:0,cbh:0,cbc:0,aua:0,auc:0,uaua:0,uauc:0,cua:0,cuc:0,wp:1001,arm:2001,ring:3001,shoes:4001,
tals:["这是一级说明","这是二级说明","这是三级说明","这是四级说明","这是五级说明"]
},
//坦克,高闪避 ,加闪避
//坦克,圣盾
5003: {
uuid:5003,name: "闪避战",path:"k3",type:0,hp: 2000, hp_up:10, shp_up:20,def:10,def_up:1,sdef_up:20,ap:20,ap_up:2,sap_up:20,atp:1,vun:0,crit:20,crit_add:0,ucr:0,dodge:0,dis:150,a_cd:1.5,
uuid:5003,name: "闪避战",path:"k3",quality:1,kind:1,type:0,hp: 2000, hp_up:10, shp_up:20,def:10,def_up:1,sdef_up:20,ap:20,ap_up:2,sap_up:20,atp:1,vun:0,crit:20,crit_add:0,ucr:0,dodge:0,dis:180,a_cd:1.5,
lvexp:0,slvexp:0,slv:0, speed: 100,aexp:5,uaexp:1,cexp:10,doexp:10,dexp:20,sk1:[6005,6005,6005,6005,6005,6005],sk2:[6102,6102,6102,6102,6102,6102],sk3:[6102,6102,6102,6102,6102,6102],pw:0,pwm:150,pws:10,apw:0,uapw:0,cpw:0,dpw:0,dopw:0,
akr:[10,20,30,40,50,60],akc:[1,1,1,1,1,1],uar:[10,20,30,40,50,60],uac:[1,1,1,1,1,1],dgr:[10,20,30,40,50,60],dgc:[1,1,1,1,1,1],crr:[10,20,30,40,50,60],crc:[1,1,1,1,1,1],
abh:0,abc:0,uabh:0,uabc:0,cbh:0,cbc:0,aua:0,auc:0,uaua:0,uauc:0,cua:0,cuc:0,wp:1001,arm:2001,ring:3001,shoes:4001,
tals:["这是一级说明","这是二级说明","这是三级说明","这是四级说明","这是五级说明"]
},
5004: {
uuid:5004,name: "绿箭",path:"a1",type:1,hp: 2000, hp_up:10, shp_up:20,def:10,def_up:1,sdef_up:20,ap:20,ap_up:2,sap_up:20,atp:1,vun:0,crit:20,crit_add:0,ucr:0,dodge:0,dis:300,a_cd:1.5,
uuid:5004,name: "绿箭",path:"a1",quality:3,kind:1,type:1,hp: 2000, hp_up:10, shp_up:20,def:10,def_up:1,sdef_up:20,ap:20,ap_up:2,sap_up:20,atp:1,vun:0,crit:20,crit_add:0,ucr:0,dodge:0,dis:300,a_cd:1.5,
lvexp:0,slvexp:0,slv:0, speed: 50,aexp:5,uaexp:1,cexp:10,doexp:10,dexp:20,sk1:[6006,6006,6006,6006,6006,6006],sk2:[6102,6102,6102,6102,6102,6102],sk3:[6102,6102,6102,6102,6102,6102],pw:0,pwm:150,pws:10,apw:0,uapw:0,cpw:0,dpw:0,dopw:0,
akr:[10,20,30,40,50,60],akc:[1,1,1,1,1,1],uar:[10,20,30,40,50,60],uac:[1,1,1,1,1,1],dgr:[10,20,30,40,50,60],dgc:[1,1,1,1,1,1],crr:[10,20,30,40,50,60],crc:[1,1,1,1,1,1],
abh:0,abc:0,uabh:0,uabc:0,cbh:0,cbc:0,aua:0,auc:0,uaua:0,uauc:0,cua:0,cuc:0,wp:1001,arm:2001,ring:3001,shoes:4001,
tals:["这是一级说明","这是二级说明","这是三级说明","这是四级说明","这是五级说明"]
},
5005: {
uuid:5005,name: "罗宾汉",path:"a2",type:1,hp: 2000, hp_up:10, shp_up:20,def:10,def_up:1,sdef_up:20,ap:20,ap_up:2,sap_up:20,atp:1,vun:0,crit:20,crit_add:0,ucr:0,dodge:0,dis:300,a_cd:1.5,
uuid:5005,name: "罗宾汉",path:"a2",quality:2,kind:1,type:1,hp: 2000, hp_up:10, shp_up:20,def:10,def_up:1,sdef_up:20,ap:20,ap_up:2,sap_up:20,atp:1,vun:0,crit:20,crit_add:0,ucr:0,dodge:0,dis:300,a_cd:1.5,
lvexp:0,slvexp:0,slv:0, speed: 50,aexp:5,uaexp:1,cexp:10,doexp:10,dexp:20,sk1:[6006,6006,6006,6006,6006,6006],sk2:[6102,6102,6102,6102,6102,6102],sk3:[6102,6102,6102,6102,6102,6102],pw:0,pwm:150,pws:10,apw:0,uapw:0,cpw:0,dpw:0,dopw:0,
akr:[10,20,30,40,50,60],akc:[1,1,1,1,1,1],uar:[10,20,30,40,50,60],uac:[1,1,1,1,1,1],dgr:[10,20,30,40,50,60],dgc:[1,1,1,1,1,1],crr:[10,20,30,40,50,60],crc:[1,1,1,1,1,1],
abh:0,abc:0,uabh:0,uabc:0,cbh:0,cbc:0,aua:0,auc:0,uaua:0,uauc:0,cua:0,cuc:0,wp:1001,arm:2001,ring:3001,shoes:4001,
tals:["这是一级说明","这是二级说明","这是三级说明","这是四级说明","这是五级说明"]
},
5006: {
uuid:5006,name: "鹰眼",path:"a3",type:1,hp: 2000, hp_up:10, shp_up:20,def:10,def_up:1,sdef_up:20,ap:20,ap_up:2,sap_up:20,atp:1,vun:0,crit:20,crit_add:0,ucr:0,dodge:0,dis:300,a_cd:1.5,
uuid:5006,name: "鹰眼",path:"a3",quality:1,kind:1,type:1,hp: 2000, hp_up:10, shp_up:20,def:10,def_up:1,sdef_up:20,ap:20,ap_up:2,sap_up:20,atp:1,vun:0,crit:20,crit_add:0,ucr:0,dodge:0,dis:300,a_cd:1.5,
lvexp:0,slvexp:0,slv:0, speed: 50,aexp:5,uaexp:1,cexp:10,doexp:10,dexp:20,sk1:[6006,6006,6006,6006,6006,6006],sk2:[6102,6102,6102,6102,6102,6102],sk3:[6102,6102,6102,6102,6102,6102],pw:0,pwm:150,pws:10,apw:0,uapw:0,cpw:0,dpw:0,dopw:0,
akr:[10,20,30,40,50,60],akc:[1,1,1,1,1,1],uar:[10,20,30,40,50,60],uac:[1,1,1,1,1,1],dgr:[10,20,30,40,50,60],dgc:[1,1,1,1,1,1],crr:[10,20,30,40,50,60],crc:[1,1,1,1,1,1],
abh:0,abc:0,uabh:0,uabc:0,cbh:0,cbc:0,aua:0,auc:0,uaua:0,uauc:0,cua:0,cuc:0,wp:1001,arm:2001,ring:3001,shoes:4001,
tals:["这是一级说明","这是二级说明","这是三级说明","这是四级说明","这是五级说明"]
},
5007: {
uuid:5007,name: "奶骑",path:"pd1",type:1,hp: 2000, hp_up:10, shp_up:20,def:10,def_up:1,sdef_up:20,ap:20,ap_up:2,sap_up:20,atp:1,vun:0,crit:20,crit_add:0,ucr:0,dodge:0,dis:300,a_cd:1.5,
lvexp:0,slvexp:0,slv:0, speed: 100,aexp:5,uaexp:1,cexp:10,doexp:10,dexp:20,sk1:[6006,6006,6006,6006,6006,6006],sk2:[6102,6102,6102,6102,6102,6102],sk3:[6102,6102,6102,6102,6102,6102],pw:0,pwm:150,pws:10,apw:0,uapw:0,cpw:0,dpw:0,dopw:0,
uuid:5007,name: "冰法",path:"m1",quality:3,kind:2,type:1,hp: 2000, hp_up:10, shp_up:20,def:10,def_up:1,sdef_up:20,ap:20,ap_up:2,sap_up:20,atp:1,vun:0,crit:20,crit_add:0,ucr:0,dodge:0,dis:300,a_cd:1.5,
lvexp:0,slvexp:0,slv:0, speed: 50,aexp:5,uaexp:1,cexp:10,doexp:10,dexp:20,sk1:[6006,6006,6006,6006,6006,6006],sk2:[6102,6102,6102,6102,6102,6102],sk3:[6102,6102,6102,6102,6102,6102],pw:0,pwm:150,pws:10,apw:0,uapw:0,cpw:0,dpw:0,dopw:0,
akr:[10,20,30,40,50,60],akc:[1,1,1,1,1,1],uar:[10,20,30,40,50,60],uac:[1,1,1,1,1,1],dgr:[10,20,30,40,50,60],dgc:[1,1,1,1,1,1],crr:[10,20,30,40,50,60],crc:[1,1,1,1,1,1],
abh:0,abc:0,uabh:0,uabc:0,cbh:0,cbc:0,aua:0,auc:0,uaua:0,uauc:0,cua:0,cuc:0,wp:1001,arm:2001,ring:3001,shoes:4001,
tals:["这是一级说明","这是二级说明","这是三级说明","这是四级说明","这是五级说明"]
},
5008: {
uuid:5008,name: "帕拉丁",path:"pld1",quality:3,kind:1,type:0,hp: 2000, hp_up:10, shp_up:20,def:10,def_up:1,sdef_up:20,ap:20,ap_up:2,sap_up:20,atp:1,vun:0,crit:20,crit_add:0,ucr:0,dodge:0,dis:180,a_cd:1.5,
lvexp:0,slvexp:0,slv:0, speed: 100,aexp:5,uaexp:1,cexp:10,doexp:10,dexp:20,sk1:[6005,6005,6005,6005,6005,6005],sk2:[6102,6102,6102,6102,6102,6102],sk3:[6102,6102,6102,6102,6102,6102],pw:0,pwm:150,pws:10,apw:10,uapw:10,cpw:10,dpw:10,dopw:10,
akr:[10,20,30,40,50,60],akc:[1,1,1,1,1,1],uar:[10,20,30,40,50,60],uac:[1,1,1,1,1,1],dgr:[10,20,30,40,50,60],dgc:[1,1,1,1,1,1],crr:[10,20,30,40,50,60],crc:[1,1,1,1,1,1],
abh:0,abc:0,uabh:0,uabc:0,cbh:0,cbc:0,aua:0,auc:0,uaua:0,uauc:0,cua:0,cuc:0,wp:1001,arm:2001,ring:3001,shoes:4001,
tals:["这是一级说明","这是二级说明","这是三级说明","这是四级说明","这是五级说明"]
@@ -112,21 +122,21 @@ export const HeroInfo = {
5201: {
uuid: 5201,name: "兽人战士", path: "mor1", type:0,hp: 2000, hp_up:10, shp_up:20,def:10,def_up:1,sdef_up:20,ap:20,ap_up:2,sap_up:20,atp:1,vun:0,crit:20,crit_add:0,ucr:0,dodge:0,dis:150,a_cd:1.5,
uuid: 5201,name: "兽人战士", path: "mor1", quality:1,kind:1,type:0,hp: 2000, hp_up:10, shp_up:20,def:10,def_up:1,sdef_up:20,ap:20,ap_up:2,sap_up:20,atp:1,vun:0,crit:20,crit_add:0,ucr:0,dodge:0,dis:180,a_cd:1.5,
lvexp:0,slvexp:0,slv:0, speed: 100,aexp:5,uaexp:1,cexp:10,doexp:10,dexp:20,sk1:[6005,6005,6005,6005,6005,6005],sk2:[6102,6102,6102,6102,6102,6102],sk3:[6102,6102,6102,6102,6102,6102],pw:0,pwm:150,pws:10,apw:0,uapw:0,cpw:0,dpw:0,dopw:0,
akr:[10,20,30,40,50,60],akc:[1,1,1,1,1,1],uar:[10,20,30,40,50,60],uac:[1,1,1,1,1,1],dgr:[10,20,30,40,50,60],dgc:[1,1,1,1,1,1],crr:[10,20,30,40,50,60],crc:[1,1,1,1,1,1],
abh:0,abc:0,uabh:0,uabc:0,cbh:0,cbc:0,aua:0,auc:0,uaua:0,uauc:0,cua:0,cuc:0,wp:1001,arm:2001,ring:3001,shoes:4001,
tals:["这是一级说明","这是二级说明","这是三级说明","这是四级说明","这是五级说明"]
},
5202: {
uuid: 5202,name: "兽人刺客", path: "mor2", type:0,hp: 2000, hp_up:10, shp_up:20,def:10,def_up:1,sdef_up:20,ap:20,ap_up:2,sap_up:20,atp:1,vun:0,crit:20,crit_add:0,ucr:0,dodge:0,dis:150,a_cd:1.5,
uuid: 5202,name: "兽人刺客", path: "mor2", quality:1,kind:1,type:0,hp: 2000, hp_up:10, shp_up:20,def:10,def_up:1,sdef_up:20,ap:20,ap_up:2,sap_up:20,atp:1,vun:0,crit:20,crit_add:0,ucr:0,dodge:0,dis:180,a_cd:1.5,
lvexp:0,slvexp:0,slv:0, speed: 100,aexp:5,uaexp:1,cexp:10,doexp:10,dexp:20,sk1:[6005,6005,6005,6005,6005,6005],sk2:[6102,6102,6102,6102,6102,6102],sk3:[6102,6102,6102,6102,6102,6102],pw:0,pwm:150,pws:10,apw:0,uapw:0,cpw:0,dpw:0,dopw:0,
akr:[10,20,30,40,50,60],akc:[1,1,1,1,1,1],uar:[10,20,30,40,50,60],uac:[1,1,1,1,1,1],dgr:[10,20,30,40,50,60],dgc:[1,1,1,1,1,1],crr:[10,20,30,40,50,60],crc:[1,1,1,1,1,1],
abh:0,abc:0,uabh:0,uabc:0,cbh:0,cbc:0,aua:0,auc:0,uaua:0,uauc:0,cua:0,cuc:0,wp:1001,arm:2001,ring:3001,shoes:4001,
tals:["这是一级说明","这是二级说明","这是三级说明","这是四级说明","这是五级说明"]
},
5203: {
uuid: 5203,name: "兽人护卫", path: "mor3", type:0,hp: 2000, hp_up:10, shp_up:20,def:10,def_up:1,sdef_up:20,ap:20,ap_up:2,sap_up:20,atp:1,vun:0,crit:20,crit_add:0,ucr:0,dodge:0,dis:150,a_cd:1.5,
uuid: 5203,name: "兽人护卫", path: "mor3", quality:1,kind:1,type:0,hp: 2000, hp_up:10, shp_up:20,def:10,def_up:1,sdef_up:20,ap:20,ap_up:2,sap_up:20,atp:1,vun:0,crit:20,crit_add:0,ucr:0,dodge:0,dis:180,a_cd:1.5,
lvexp:0,slvexp:0,slv:0, speed: 100,aexp:5,uaexp:1,cexp:10,doexp:10,dexp:20,sk1:[6005,6005,6005,6005,6005,6005],sk2:[6102,6102,6102,6102,6102,6102],sk3:[6102,6102,6102,6102,6102,6102],pw:0,pwm:150,pws:10,apw:0,uapw:0,cpw:0,dpw:0,dopw:0,
akr:[10,20,30,40,50,60],akc:[1,1,1,1,1,1],uar:[10,20,30,40,50,60],uac:[1,1,1,1,1,1],dgr:[10,20,30,40,50,60],dgc:[1,1,1,1,1,1],crr:[10,20,30,40,50,60],crc:[1,1,1,1,1,1],
abh:0,abc:0,uabh:0,uabc:0,cbh:0,cbc:0,aua:0,auc:0,uaua:0,uauc:0,cua:0,cuc:0,wp:1001,arm:2001,ring:3001,shoes:4001,
@@ -134,7 +144,7 @@ export const HeroInfo = {
},
}
export const HeroList = [5001,5002,5003,5004,5005,5006]
export const HeroList = [5001,5002,5003,5004,5005,5006,5007,5008]
export const MonList = [5201]
export const HeroSet = {

View File

@@ -24,6 +24,11 @@ export class BuffComp extends Component {
dedef_cd:number=0;
dehp_cd:number=0;
decrit_cd:number=0;
iced_cd:number=0;
buff_cd:number=0;
yun_cd:number=0;
wind_cd:number=0;
speek_time:number=0;
start() {
@@ -97,6 +102,26 @@ export class BuffComp extends Component {
}
if(this.wind_cd > 0 ) this.wind_cd -= deltaTime;
if(this.wind_cd <= 0 && this.node.getChildByName("wind").active){
this.node.getChildByName("wind").active = false;
}
if(this.yun_cd > 0 ) this.yun_cd -= deltaTime;
if(this.yun_cd <= 0 && this.node.getChildByName("yun").active){
this.node.getChildByName("yun").active = false;
}
if(this.iced_cd > 0 ) this.iced_cd -= deltaTime;
if(this.iced_cd <= 0 && this.node.getChildByName("iced").active){
this.node.getChildByName("iced").active = false;
}
if(this.buff_cd > 0 ) this.buff_cd -= deltaTime;
if(this.buff_cd <= 0 && this.node.getChildByName("buff").active){
this.node.getChildByName("buff").active = false;
}
this.hp_show()
this.in_speek(deltaTime)
@@ -123,7 +148,6 @@ export class BuffComp extends Component {
show_hp(t:number=2){
this.hp_cd = t;
this.node.getChildByName("top").getChildByName("buff").getChildByName("hp").active = true;
}
show_crit(t:number=2){
this.crit_cd = t;
@@ -145,13 +169,32 @@ export class BuffComp extends Component {
show_debuff_hp(t:number=2){
this.dehp_cd = t;
this.node.getChildByName("top").getChildByName("buff").getChildByName("hp").active = true;
}
show_debuff_crit(t:number=2){
this.decrit_cd = t;
this.node.getChildByName("top").getChildByName("buff").getChildByName("crit").active = true;
}
show_iced(t:number=1){
this.iced_cd = t;
this.node.getChildByName("iced").active = true;
}
show_yun(t:number=1){
this.iced_cd = t;
this.node.getChildByName("yun").active = true;
}
show_wind(t:number=1){
this.wind_cd = t;
this.node.getChildByName("wind").active = true;
}
show_buff(t:number=1){
this.buff_cd = t;
this.node.getChildByName("buff").active = true;
}
hp_show(){
let hp_progress= this.heroView.hp/this.heroView.rhp_max;
this.node.getChildByName("top").getChildByName("hp").getComponent(ProgressBar)!.progress = hp_progress;
@@ -161,6 +204,12 @@ export class BuffComp extends Component {
this.node.getChildByName("top").getChildByName("hp").active = true;
}
}
max_show(){
this.node.getChildByName("max").active=true
this.scheduleOnce(()=>{
this.node.getChildByName("max").active=false
},0.8)
}
dead(){
var path = "game/skills/dead";
var prefab: Prefab = oops.res.get(path, Prefab)!;
@@ -178,7 +227,7 @@ export class BuffComp extends Component {
node.parent = this.node;
}
to_speek(words:string,time:number=0.5){
to_speek(words:string,time:number=0.5){
this.speek_time=0.5
this.node.getChildByName("tooltip").active=true
this.node.getChildByName("tooltip").getChildByName("words").getComponent(Label)!.string = words

View File

@@ -1,8 +1,9 @@
import { _decorator, Component, Label, Node, resources, Sprite, SpriteAtlas } from 'cc';
import { _decorator, Color, Component, Label, Node, resources, Sprite, SpriteAtlas } from 'cc';
import { HeroInfo } from '../common/config/heroSet';
import { oops } from '../../../../extensions/oops-plugin-framework/assets/core/Oops';
import { UIID } from '../common/config/GameUIConfig';
import { Items } from '../common/config/Items';
import { ColorSet } from '../common/config/BoxSet';
const { ccclass, property } = _decorator;
@ccclass('HChipComp')
@@ -34,6 +35,17 @@ export class HChipComp extends Component {
}else{
this.node.getChildByName("num").getComponent(Label).string = "";
}
switch(HeroInfo[uuid].quality){
case 1:
this.node.getChildByName("bg").getComponent(Sprite).color= new Color().fromHEX(ColorSet["BLUE"]);
break;
case 2:
this.node.getChildByName("bg").getComponent(Sprite).color= new Color().fromHEX(ColorSet["YELLOW"]);
break;
case 3:
this.node.getChildByName("bg").getComponent(Sprite).color= new Color().fromHEX(ColorSet["RED"]);
break;
}
}
}

View File

@@ -1,9 +1,11 @@
import { _decorator, Label } from "cc";
import { _decorator, Color, Label, 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 { HeroHomeComp } from "../map/HeroHomeComp";
import { oops } from "../../../../extensions/oops-plugin-framework/assets/core/Oops";
import { smc } from "../common/SingletonModuleComp";
import { HeroInfo } from "../common/config/heroSet";
import { ColorSet } from "../common/config/BoxSet";
const { ccclass, property } = _decorator;
@@ -38,6 +40,7 @@ export class HeroCardComp extends CCComp {
this.node.getChildByName("show").active=val
}
update_data(){
let slv = this.node.getChildByName("slv")
this.node.getChildByName("lv").getComponent(Label).string=smc.heros[this.h_uuid].lv.toString()+"级"
if(smc.heros[this.h_uuid].slv==0){
@@ -48,7 +51,17 @@ export class HeroCardComp extends CCComp {
this.node.getChildByName("lock").active=false
slv.getChildByName("slv").getComponent(Label).string=smc.heros[this.h_uuid].slv.toString()
}
switch(HeroInfo[this.h_uuid].quality){
case 1:
this.node.getChildByName("bg").getComponent(Sprite).color= new Color().fromHEX(ColorSet["BLUE"]);
break;
case 2:
this.node.getChildByName("bg").getComponent(Sprite).color= new Color().fromHEX(ColorSet["YELLOW"]);
break;
case 3:
this.node.getChildByName("bg").getComponent(Sprite).color= new Color().fromHEX(ColorSet["RED"]);
break;
}
}
/** 全局消息逻辑处理 */
// private onHandler(event: string, args: any) {

View File

@@ -1,10 +1,11 @@
import { _decorator, Label } from "cc";
import { _decorator, Color, Label, 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 { MissionHomeComp } from "../map/MissionHomeComp";
import { oops } from "../../../../extensions/oops-plugin-framework/assets/core/Oops";
import { smc } from "../common/SingletonModuleComp";
import { GameSet } from "../common/config/BoxSet";
import { ColorSet, GameSet } from "../common/config/BoxSet";
import { HeroInfo } from "../common/config/heroSet";
const { ccclass, property } = _decorator;
@@ -62,6 +63,17 @@ export class HeroSelectComp extends CCComp {
slv.active=true
slv.getChildByName("slv").getComponent(Label).string=smc.heros[this.h_uuid].slv.toString()
}
switch(HeroInfo[this.h_uuid].quality){
case 1:
this.node.getChildByName("bg").getComponent(Sprite).color= new Color().fromHEX(ColorSet["BLUE"]);
break;
case 2:
this.node.getChildByName("bg").getComponent(Sprite).color= new Color().fromHEX(ColorSet["YELLOW"]);
break;
case 3:
this.node.getChildByName("bg").getComponent(Sprite).color= new Color().fromHEX(ColorSet["RED"]);
break;
}
}
/** 全局消息逻辑处理 */
// private onHandler(event: string, args: any) {

View File

@@ -123,8 +123,6 @@ export class HeroViewComp extends CCComp {
onLoad() {
this.as = this.getComponent(HeroSpine);
// this.BoxRang = this.node.getChildByName("range_box");
// this.BoxRang = this.node.getChildByName("range_box");
} /** 视图层逻辑代码分离演示 */
@@ -138,7 +136,7 @@ export class HeroViewComp extends CCComp {
this.node.getChildByName("top").setScale(this.scale,1);
/** 显示角色血量 */
this.node.getChildByName("top").getChildByName("hp").active = true;
// this.node.getChildByName("shielded").active = false;
// this.node.getChildByName("top").setScale(this.scale,1);
// this.node.getChildByName("atk").setScale(this.scale,1);
@@ -186,13 +184,13 @@ export class HeroViewComp extends CCComp {
if(selfCollider.group == otherCollider.group&&selfCollider.tag==otherCollider.tag){
if(selfCollider.group==BoxSet.HERO){
if(otherCollider.node.getComponent(HeroViewComp).type == this.type && self_x < other_x && Math.abs(other_x-self_x) < 20 ){
if(otherCollider.node.getComponent(HeroViewComp).type == this.type && self_x < other_x && Math.abs(other_x-self_x) < 50 ){
// this.node.setSiblingIndex(otherCollider.node.getSiblingIndex()-10)
this.stop_cd = 0.1;
}
}
if(selfCollider.group==BoxSet.MONSTER){
if(otherCollider.node.getComponent(HeroViewComp).type == this.type && self_x > other_x && Math.abs(other_x-self_x) < 20 ){
if(otherCollider.node.getComponent(HeroViewComp).type == this.type && self_x > other_x && Math.abs(other_x-self_x) < 50 ){
// this.node.setSiblingIndex(otherCollider.node.getSiblingIndex()-10)
this.stop_cd = 0.1;
}
@@ -221,7 +219,7 @@ export class HeroViewComp extends CCComp {
this.check_power()
this.check_atk_counts()
this.check_enemy_alive()
this.check_mission_buf()
this.check_mission_buff()
if(this.ice_cd > 0){ this.ice_cd -=dt; return }
if(this.yun_cd > 0){ this.yun_cd -=dt; return }
@@ -231,18 +229,8 @@ export class HeroViewComp extends CCComp {
this.in_atk(dt);
this.move(dt);
}
check_iceed(dt:number){
if(this.ice_cd > 0){
this.ice_cd -= dt;
if(this.ice_cd <= 0){
this.ice_cd = 0;
}
}
}
check_yuned(dt:number){
}
check_mission_buf(){
check_mission_buff(){
this.ap_max=(100+smc.vmdata.mission.ap)/100*this.ap
this.crit_max=(100+smc.vmdata.mission.crit)/100*this.crit
this.def_max=(100+smc.vmdata.mission.def)/100*this.def
@@ -282,22 +270,6 @@ export class HeroViewComp extends CCComp {
this.is_atking=false
}
}
//进入墓地
to_grave(){
let pos =v3(-999,this.node.position.y)
if(this.box_group == BoxSet.MONSTER){
pos =v3(999,this.node.position.y)
smc.vmdata.mission.mdead +=1
}else{
smc.vmdata.mission.dead +=1
}
this.node.setPosition(pos)
}
//是否在墓地
in_grave(){
return this.node.position.x < -900 || this.node.position.x > 900;
}
//状态切换
status_change(type:string){
this.status=type
@@ -378,10 +350,8 @@ export class HeroViewComp extends CCComp {
check_power(){
if(this.pw >= this.pwm){
this.pw = 0
this.node.getChildByName("max").active=true
this.scheduleOnce(()=>{
this.node.getChildByName("max").active=false
},0.8)
this.BUFFCOMP.max_show()
this.handle_skill(this.sk2)
return true
}else{
@@ -443,10 +413,7 @@ export class HeroViewComp extends CCComp {
// console.log("攻击判断: i="+i+":akr="+this.akr);
if(i < this.akr){
// console.log("攻击触发: i="+i+":akr="+this.akr);
this.node.getChildByName("max").active=true
this.scheduleOnce(()=>{
this.node.getChildByName("max").active=false
},0.8)
this.BUFFCOMP.max_show()
this.handle_skill(this.sk3)
}
}
@@ -457,10 +424,7 @@ export class HeroViewComp extends CCComp {
// console.log("闪避判断: i="+i+":dgr="+this.dgr);
if(i < this.dgr){
// console.log("闪避触发: i="+i+":dgr="+this.dgr);
this.node.getChildByName("max").active=true
this.scheduleOnce(()=>{
this.node.getChildByName("max").active=false
},0.8)
this.BUFFCOMP.max_show()
this.handle_skill(this.sk3)
}
}
@@ -472,10 +436,7 @@ export class HeroViewComp extends CCComp {
if(i < this.crr){
// console.log("暴击触发: i="+i+":crr="+this.crr);
this.node.getChildByName("max").active=true
this.scheduleOnce(()=>{
this.node.getChildByName("max").active=false
},0.8)
this.BUFFCOMP.max_show()
this.handle_skill(this.sk3)
}
}
@@ -485,10 +446,7 @@ export class HeroViewComp extends CCComp {
// console.log("受伤判断i="+i+":akr="+this.uar);
if(i < this.uar){
// console.log("受伤触发: i="+i+":uar="+this.uar);
this.node.getChildByName("max").active=true
this.scheduleOnce(()=>{
this.node.getChildByName("max").active=false
},0.8)
this.BUFFCOMP.max_show()
this.handle_skill(this.sk3)
}
}
@@ -616,13 +574,14 @@ export class HeroViewComp extends CCComp {
power_add(p:number){
this.pw+= p
}
hp_max_add(){
console.log("hp_max_add 动画");
}
/**
* 增加英雄的行动点数AP
* @param ap 要增加的行动点数。
* @param time 可选参数表示增加行动点数的时间默认为0。
*/
add_ap(ap: number,time:number=0){
this.ap += ap;
}
add_shield(shield:number){
this.shield =shield
console.log("shield:",shield);
@@ -636,7 +595,7 @@ export class HeroViewComp extends CCComp {
this.BUFFCOMP.tooltip(2,hp.toFixed(0));
}
add_hp_max(hp: number=0){
this.hp_max_add()
this.BUFFCOMP.show_buff(1)
this.hp += hp/100*this.hp_max;
}
hp_less(hp: number,is_crit:boolean=false){
@@ -675,7 +634,7 @@ export class HeroViewComp extends CCComp {
}
in_atked() {
this.BUFFCOMP.in_atked()
this.BUFFCOMP.in_atked()
// this.as.atked();
this.atked_count++;
this.exp_add(this.uaexp)
@@ -686,10 +645,24 @@ export class HeroViewComp extends CCComp {
this.exp_add(this.dexp)
this.power_add(this.dpw)
}
toDestroy(){
//进入墓地
to_grave(){
let pos =v3(-999,this.node.position.y)
if(this.box_group == BoxSet.MONSTER){
pos =v3(999,this.node.position.y)
smc.vmdata.mission.mdead +=1
}else{
smc.vmdata.mission.dead +=1
}
this.node.setPosition(pos)
}
toAlive(){
//是否在墓地
in_grave(){
return this.node.position.x < -900 || this.node.position.x > 900;
}
to_alive(){
let pos =v3(HeroSet.StartPos[this.type],this.node.position.y,this.node.position.z)
this.node.setPosition(pos)
}

View File

@@ -1,10 +1,12 @@
import { _decorator,Button,EventHandler,EventTouch,Label,NodeEventType,ProgressBar,resources,Sprite,SpriteAtlas,UITransform,v3 } from "cc";
import { _decorator,Button,Color,EventHandler,EventTouch,Label,NodeEventType,ProgressBar,resources,Sprite,SpriteAtlas,UITransform,v3 } from "cc";
import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/module/common/CCComp";
import { 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 { HeroModelComp } from "../hero/HeroModelComp";
import { HeroInfo } from "../common/config/heroSet";
import { ColorSet } from "../common/config/BoxSet";
const { ccclass, property } = _decorator;
@@ -35,7 +37,18 @@ export class HCardComp extends CCComp {
this.pw=this.node.getChildByName("pow").getComponent(ProgressBar)!
this.hc_name.string= this.heros[this.hi].HeroView.hero_name
// this.node.getChildByName("lv").getComponent(Label).string=this.heros[this.hi].HeroView.lv.toString()+"级";
console.log("hcard start")
// console.log("hcard start",this.heros[this.hi].HeroView.hero_uuid)
switch(HeroInfo[this.heros[this.hi].HeroView.hero_uuid].quality){
case 1:
this.node.getChildByName("bg").getComponent(Sprite).color= new Color().fromHEX(ColorSet["BLUE"]);
break;
case 2:
this.node.getChildByName("bg").getComponent(Sprite).color= new Color().fromHEX(ColorSet["YELLOW"]);
break;
case 3:
this.node.getChildByName("bg").getComponent(Sprite).color= new Color().fromHEX(ColorSet["RED"]);
break;
}
}
protected update(dt: number): void {
if(this.is_dead) return
@@ -53,6 +66,7 @@ export class HCardComp extends CCComp {
this.life.progress=this.heros[this.hi].HeroView.hp/this.heros[this.hi].HeroView.rhp_max
this.pw.progress=this.heros[this.hi].HeroView.pw/this.heros[this.hi].HeroView.pwm
}
/** 视图对象通过 ecs.Entity.remove(ControllerComp) 删除组件是触发组件处理自定义释放逻辑 */
reset() {

View File

@@ -25,22 +25,36 @@ export class HeroHomeComp extends CCComp {
start() {
// this.load_talents()
console.log("hero_home start")
this.h_uuid=5001
this.hero_show(this.h_uuid)
// this.h_uuid=5001
// this.hero_show(this.h_uuid)
this.loads()
}
loads(){
let heros:any=HeroList
let hc:number =HeroList.length
let parent= this.node.getChildByName("heros").getChildByName("view").getChildByName("content")
parent.getComponent(UITransform).setContentSize(hc*150,200)
parent.getComponent(UITransform).setContentSize(720,Math.ceil(HeroList.length/5)*180)
console.log("parent",parent)
for (let i = 0; i < hc; i++) {
let hcc =ecs.getEntity<HeroCard>(HeroCard)
hcc.load(HeroList[i],parent)
if (HeroInfo[HeroList[i]].quality==3) {
let hcc =ecs.getEntity<HeroCard>(HeroCard)
hcc.load(HeroList[i],parent)
}
}
for (let i = 0; i < hc; i++) {
if (HeroInfo[HeroList[i]].quality==2) {
let hcc =ecs.getEntity<HeroCard>(HeroCard)
hcc.load(HeroList[i],parent)
}
}
for (let i = 0; i < hc; i++) {
if (HeroInfo[HeroList[i]].quality==1) {
let hcc =ecs.getEntity<HeroCard>(HeroCard)
hcc.load(HeroList[i],parent)
}
}
}
hero_show(uuid:number) {
this.node.getChildByName("show").active=true
this.h_uuid=uuid
this.role=smc.heros[uuid]
this.hero=HeroInfo[uuid]
@@ -50,24 +64,24 @@ export class HeroHomeComp extends CCComp {
var sk_path = "game/skills/skill_icon"
var icon_path = "game/heros/herois"
this.node.getChildByName("name").getChildByName("value").getComponent(Label).string=this.hero.name
this.node.getChildByName("show").getChildByName("name").getChildByName("value").getComponent(Label).string=this.hero.name
resources.load(icon_path, SpriteAtlas, (err: any, atlas) => {
const sprite = this.node.getChildByName("hero").getChildByName("icon").getComponent(Sprite);
const sprite = this.node.getChildByName("show").getChildByName("hero").getChildByName("icon").getComponent(Sprite);
sprite.spriteFrame = atlas.getSpriteFrame(this.hero.path);
});
resources.load(sk_path, SpriteAtlas, (err: any, atlas) => {
const sprite = this.node.getChildByName("bottom").getChildByName("sk").getChildByName("skicon").getChildByName("Mask").getChildByName("icon").getComponent(Sprite);
const sprite = this.node.getChildByName("show").getChildByName("bottom").getChildByName("sk").getChildByName("skicon").getChildByName("Mask").getChildByName("icon").getComponent(Sprite);
sprite.spriteFrame = atlas.getSpriteFrame(skill1.path);
});
this.node.getChildByName("bottom").getChildByName("sk").getChildByName("name").getComponent(Label).string = skill1.name;
this.node.getChildByName("bottom").getChildByName("sk").getChildByName("info").getComponent(Label).string = skill1.info;
this.node.getChildByName("show").getChildByName("bottom").getChildByName("sk").getChildByName("name").getComponent(Label).string = skill1.name;
this.node.getChildByName("show").getChildByName("bottom").getChildByName("sk").getChildByName("info").getComponent(Label).string = skill1.info;
resources.load(sk_path, SpriteAtlas, (err: any, atlas) => {
const sprite = this.node.getChildByName("bottom").getChildByName("sk2").getChildByName("skicon").getChildByName("Mask").getChildByName("icon").getComponent(Sprite);
const sprite = this.node.getChildByName("show").getChildByName("bottom").getChildByName("sk2").getChildByName("skicon").getChildByName("Mask").getChildByName("icon").getComponent(Sprite);
sprite.spriteFrame = atlas.getSpriteFrame(skill2.path);
});
this.node.getChildByName("bottom").getChildByName("sk2").getChildByName("name").getComponent(Label).string = skill2.name;
this.node.getChildByName("bottom").getChildByName("sk2").getChildByName("info").getComponent(Label).string = skill2.info;
this.node.getChildByName("show").getChildByName("bottom").getChildByName("sk2").getChildByName("name").getComponent(Label).string = skill2.name;
this.node.getChildByName("show").getChildByName("bottom").getChildByName("sk2").getChildByName("info").getComponent(Label).string = skill2.info;
// tal.getChildByName("slv1").getChildByName("val").getComponent(Label).string = this.hero.tals[0]
// tal.getChildByName("slv2").getChildByName("val").getComponent(Label).string = this.hero.tals[1]
@@ -77,19 +91,23 @@ export class HeroHomeComp extends CCComp {
this.update_data()
}
update_data(){
let slv_node=this.node.getChildByName("name").getChildByName("slv");
let lvup=this.node.getChildByName("lvup");
let slvup=this.node.getChildByName("slvup");
let attr = this.node.getChildByName("attr");
let attr2 = this.node.getChildByName("attr2").getChildByName("other");
this.node.getChildByName("name").getChildByName("lv").getComponent(Label).string = this.role.lv.toString()+"级";
if( this.role.slv==0) {
slv_node.getChildByName("slv").active=false
}else{
slv_node.getChildByName("slv").active=true
slv_node.getChildByName("slv").getComponent(Label).string = this.role.slv.toString();
};
let slv_node=this.node.getChildByName("show").getChildByName("name").getChildByName("slv");
let lvup=this.node.getChildByName("show").getChildByName("lvup");
let slvup=this.node.getChildByName("show").getChildByName("slvup");
let attr = this.node.getChildByName("show").getChildByName("attr");
let attr2 = this.node.getChildByName("show").getChildByName("attr2").getChildByName("other");
this.node.getChildByName("show").getChildByName("name").getChildByName("lv").getComponent(Label).string = this.role.lv.toString()+"级";
slv_node.getChildByName("slv").getComponent(Label).string = this.role.slv.toString();
this.node.getChildByName("show").getChildByName("name").getChildByName("quality").getChildByName("q1").active = this.hero.quality == 1;
this.node.getChildByName("show").getChildByName("name").getChildByName("quality").getChildByName("q2").active = this.hero.quality == 2;
this.node.getChildByName("show").getChildByName("name").getChildByName("quality").getChildByName("q3").active = this.hero.quality == 3;
this.node.getChildByName("show").getChildByName("name").getChildByName("quality").getChildByName("k1").active = this.hero.kind == 1;
this.node.getChildByName("show").getChildByName("name").getChildByName("quality").getChildByName("k2").active = this.hero.kind == 2;
this.node.getChildByName("show").getChildByName("name").getChildByName("quality").getChildByName("k3").active = this.hero.kind == 3;
// lvup.getChildByName("gold").getChildByName("need").getComponent(Label).string = (UpGold.LvUp*this.role.lv).toString()
lvup.getChildByName("item").getChildByName("need").getComponent(Label).string = ((LvUp[0]+this.hero.lvexp)*this.role.lv).toString()
lvup.getChildByName("info").getChildByName("ap").getComponent(Label).string = "+"+this.hero.ap_up
@@ -103,7 +121,6 @@ export class HeroHomeComp extends CCComp {
slvup.getChildByName("cost").getChildByName("bar").getComponent(ProgressBar).progress = smc.heros[this.h_uuid].num/((SlvUp[this.role.slv]-HeroInfo[this.h_uuid].slvexp)*(1+this.role.slv))
let hchipcomp= slvup.getChildByName("cost").getChildByName("hchip").getComponent(HChipComp)
hchipcomp.update_data(this.h_uuid,0)
//todo cost icon 需要通过预制体进行变更
slvup.getChildByName("info").getChildByName("ap").getComponent(Label).string = "+"+this.hero.sap_up+"%"
slvup.getChildByName("info").getChildByName("def").getComponent(Label).string = "+"+this.hero.sdef_up+"%"
@@ -114,14 +131,14 @@ export class HeroHomeComp extends CCComp {
slvup.getChildByName("btned").active=false
};
if( this.role.slv==0) {
this.node.getChildByName("call").getChildByName("Node").getChildByName("cost").getChildByName("need").getComponent(Label).string = ((SlvUp[this.role.slv]-HeroInfo[this.h_uuid].slvexp)*(1+this.role.slv)).toString()
this.node.getChildByName("call").getChildByName("Node").getChildByName("cost").getChildByName("num").getComponent(Label).string = smc.heros[this.h_uuid].num.toString()
this.node.getChildByName("call").getChildByName("Node").getChildByName("cost").getChildByName("bar").getComponent(ProgressBar).progress = smc.heros[this.h_uuid].num/((SlvUp[this.role.slv]-HeroInfo[this.h_uuid].slvexp)*(1+this.role.slv))
let hchipcomp= this.node.getChildByName("call").getChildByName("Node").getChildByName("cost").getChildByName("hchip").getComponent(HChipComp)
this.node.getChildByName("show").getChildByName("call").getChildByName("Node").getChildByName("cost").getChildByName("need").getComponent(Label).string = ((SlvUp[this.role.slv]-HeroInfo[this.h_uuid].slvexp)*(1+this.role.slv)).toString()
this.node.getChildByName("show").getChildByName("call").getChildByName("Node").getChildByName("cost").getChildByName("num").getComponent(Label).string = smc.heros[this.h_uuid].num.toString()
this.node.getChildByName("show").getChildByName("call").getChildByName("Node").getChildByName("cost").getChildByName("bar").getComponent(ProgressBar).progress = smc.heros[this.h_uuid].num/((SlvUp[this.role.slv]-HeroInfo[this.h_uuid].slvexp)*(1+this.role.slv))
let hchipcomp= this.node.getChildByName("show").getChildByName("call").getChildByName("Node").getChildByName("cost").getChildByName("hchip").getComponent(HChipComp)
hchipcomp.update_data(this.h_uuid,0)
this.node.getChildByName("call").active=true
this.node.getChildByName("show").getChildByName("call").active=true
}else{
this.node.getChildByName("call").active=false
this.node.getChildByName("show").getChildByName("call").active=false
};
attr.getChildByName("ap").getChildByName("val").getComponent(Label).string = ((this.hero.ap+this.hero.ap_up* this.role.lv)*(1+this.hero.sap_up/100*this.role.slv)).toFixed(0).toString()
attr.getChildByName("hp").getChildByName("val").getComponent(Label).string = ((this.hero.hp+this.hero.hp_up* this.role.lv)*(1+this.hero.shp_up/100*this.role.slv)).toFixed(0).toString()
@@ -144,15 +161,15 @@ export class HeroHomeComp extends CCComp {
oops.message.dispatchEvent("hero_card_update_info",{uuid:this.h_uuid})
}
lv_selcet(e:any,val:any){
let active = this.node.getChildByName("menu").getChildByName("active")
let active = this.node.getChildByName("show").getChildByName("menu").getChildByName("active")
tween(active).to(0.1,{position:v3(val,0)}).start()
let hero = this.node.getChildByName("hero")
let attr = this.node.getChildByName("attr")
let attr2 = this.node.getChildByName("attr2")
let info = this.node.getChildByName("info")
let lvup = this.node.getChildByName("lvup")
let sk = this.node.getChildByName("bottom").getChildByName("sk")
let slvup = this.node.getChildByName("slvup")
let hero = this.node.getChildByName("show").getChildByName("hero")
let attr = this.node.getChildByName("show").getChildByName("attr")
let attr2 = this.node.getChildByName("show").getChildByName("attr2")
let info = this.node.getChildByName("show").getChildByName("info")
let lvup = this.node.getChildByName("show").getChildByName("lvup")
let sk = this.node.getChildByName("show").getChildByName("bottom").getChildByName("sk")
let slvup = this.node.getChildByName("show").getChildByName("slvup")
if(val < 0){
tween(hero).to(0.2,{position:v3(0,hero.position.y)}).start()
tween(attr).to(0.2,{position:v3(0,attr.position.y)}).start()
@@ -198,6 +215,9 @@ export class HeroHomeComp extends CCComp {
item_show(e:any,val:any){
oops.gui.open(UIID.ItemInfo, {uuid:val,type:0});
}
close_show(){
this.node.getChildByName("show").active=false
}
reset() {
this.node.destroy();
}