This commit is contained in:
2024-09-23 08:14:39 +08:00
parent 96c96da552
commit 618a6e3f7b
65 changed files with 38950 additions and 8530 deletions

View File

@@ -59,6 +59,8 @@ export class RoleViewComp extends CCComp {
power_speed: number = 1; //能量回复速度每0.1秒回复量
skill:8001;
skills:any=[]
st_boncus: number = 1; //技能持续时间加成
s_boncus: number = 1; //技能效果加成
buff_atks:any = [];
buff_atk:number = 0;
@@ -130,6 +132,8 @@ export class RoleViewComp extends CCComp {
selfCollider.node.setSiblingIndex(otherCollider.node.getSiblingIndex()+1)
// console.log("onPreSolve b:"+selfCollider.node.uuid+":"+selfCollider.node.getSiblingIndex()+"/"+otherCollider.node.uuid+":"+otherCollider.node.getSiblingIndex());
}else{
selfCollider.node.setSiblingIndex(otherCollider.node.getSiblingIndex()-1)
}
}
@@ -158,6 +162,9 @@ export class RoleViewComp extends CCComp {
update(dt: number){
if(smc.vm_data.game_over||smc.vm_data.game_pause){
return
}
if (this.timer.update(dt)) {
}
@@ -236,7 +243,7 @@ export class RoleViewComp extends CCComp {
pos.y=300
t_pos.y=t_pos.y-300
}
skill.load(pos,BoxSet.HERO,this.node,skill_uuid,atk,t_pos);
skill.load(pos,this.box_group,this.node,skill_uuid,atk,t_pos);
// this.tooltip(3,smc.skills[skill_uuid].name,this.skill_uuid);
}
//使用max_skill
@@ -274,8 +281,8 @@ export class RoleViewComp extends CCComp {
this.atk_time = 0;
this.as.atk();
this.scheduleOnce(()=>{
this.shoot(this.skill,-30);
},0.2)
this.shoot(this.skill,-30,45);
},0.3)
}
}
@@ -306,6 +313,13 @@ export class RoleViewComp extends CCComp {
}
heathed(){
this.node.getChildByName("heathed").active=true
// console.log("role heathed");
// var path = "game/skills/heathed";
// var prefab: Prefab = oops.res.get(path, Prefab)!;
// var node = instantiate(prefab);
// let pos = v3(0,0)
// node.setPosition(pos)
// node.parent = this.node;
}
add_hp(hp: number=0){
this.heathed();