再次清理英雄,切换到像素

This commit is contained in:
2025-08-10 15:48:34 +08:00
parent 4ea590e708
commit bce3580b22
124 changed files with 18188 additions and 2627 deletions

View File

@@ -176,13 +176,17 @@ export class HeroUiComp extends CCComp {
private loadHeroIcon(iconNode: Node, heroPath: string) {
iconNode.parent.getChildByName("iconbg").active=false
const icon_path = "game/heros/heros/"+heroPath
resources.load(icon_path, sp.SkeletonData, (err, skeleton) => {
const spine = iconNode.getComponent(sp.Skeleton);
if (spine) {
spine.skeletonData = skeleton;
spine.setAnimation(0, "Idle", true);
}
});
// resources.load(icon_path, sp.SkeletonData, (err, skeleton) => {
// if(err) return
// const spine = iconNode.getComponent(sp.Skeleton);
// if (spine) {
// spine.skeletonData = skeleton;
// spine.setAnimation(0, "Idle", true);
// }
// else{
// console.error("[HeroUiComp]: loadHeroIcon error",err)
// }
// });
}