英雄成长界面继续

This commit is contained in:
2024-12-03 16:39:33 +08:00
parent 13f1a664db
commit 2ea01af8c4
3 changed files with 5868 additions and 293 deletions

View File

@@ -3,6 +3,7 @@ import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ec
import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/module/common/CCComp";
import { HeroList } from "../common/config/heroSet";
import { HeroCard } from "../hero/HeroCard";
import { smc } from "../common/SingletonModuleComp";
const { ccclass, property } = _decorator;
/** 视图层对象 */
@@ -32,6 +33,12 @@ export class HeroHomeComp extends CCComp {
}
hero_show(uuid:number) {
console.log("hero_home hero_show:",uuid)
var icon_path = "game/heros/herois"
resources.load(icon_path, SpriteAtlas, (err: any, atlas) => {
const sprite = this.node.getChildByName("hero").getChildByName("icon").getComponent(Sprite);
sprite.spriteFrame = atlas.getSpriteFrame(smc.heros[uuid].path);
});
this.node.getChildByName("name").getChildByName("value").getComponent(Label).string=smc.heros[uuid].name
}
reset() {