英雄可升级动画
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user