英雄可升级动画

This commit is contained in:
2025-01-02 16:20:56 +08:00
parent e4722cac4a
commit f516551508
31 changed files with 14757 additions and 3979 deletions

View File

@@ -74,8 +74,9 @@ export class MissionHomeComp extends CCComp {
let hc:number =HeroList.length
let parent= this.node.getChildByName("heros").getChildByName("view").getChildByName("content")
let height=Math.ceil(hc / 4)*135
let height=Math.ceil(hc / 4)*140 +100
parent.getComponent(UITransform).height=height
for (let i = 0; i < hc; i++) {
if (HeroInfo[HeroList[i]].quality==3) {
let hcc =ecs.getEntity<HeroSelect>(HeroSelect)
@@ -147,7 +148,6 @@ export class MissionHomeComp extends CCComp {
}
}
call_hero(h_uuid:number,index:number){
console.log("call hero",h_uuid,HeroInfo[h_uuid])
var path = "game/heros/uiheros/"+HeroInfo[h_uuid].path;
var prefab: Prefab = oops.res.get(path, Prefab)!;
var node = instantiate(prefab);
@@ -159,7 +159,6 @@ export class MissionHomeComp extends CCComp {
this.heros.push(comp)
}
destory_hero(h_uuid:number){
console.log("destory hero",this.heros)
for(let i=0;i<this.heros.length;i++){
if(this.heros[i].h_uuid==h_uuid){
this.heros[i].to_destroy()