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

@@ -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