技能继续

This commit is contained in:
2024-12-11 13:55:36 +08:00
parent 93e2f11274
commit eab71044d0
12 changed files with 703 additions and 1517 deletions

View File

@@ -7,6 +7,8 @@ import { UiHeroComp } from "../hero/UiHeroComp";
import { BoxSet } from "../common/config/BoxSet";
import { smc } from "../common/SingletonModuleComp";
import { HeroSelect } from "../hero/HeroSelect";
import { MSklist } from "../common/config/SkillSet";
import { MSCard } from "./MSCard";
const { ccclass, property } = _decorator;
@@ -28,7 +30,7 @@ export class MissionHomeComp extends CCComp {
start() {
// var entity = this.ent as ecs.Entity; // ecs.Entity 可转为当前模块的具体实体对象
// this.on(ModuleEvent.Cmd, this.onHandler, this);
this.loads()
this.load_hero_card()
this.load_ui_heros()
}
@@ -92,7 +94,7 @@ export class MissionHomeComp extends CCComp {
}
}
}
loads(){
load_hero_card(){
let hc:number =HeroList.length
let parent= this.node.getChildByName("heros").getChildByName("view").getChildByName("content")
let height=Math.ceil(hc / 4)*135
@@ -102,6 +104,16 @@ export class MissionHomeComp extends CCComp {
hcc.load(HeroList[i],parent)
}
}
load_skill_card(){
let ms_num:number =MSklist.length
let parent= this.node.getChildByName("skills").getChildByName("view").getChildByName("content")
let height=ms_num*135
parent.getComponent(UITransform).width=height
for (let i = 0; i < ms_num; i++) {
let msc =ecs.getEntity<MSCard>(MSCard)
msc.load(HeroList[i],parent,1)
}
}
show_uiheros(){
}