再次清理英雄,切换到像素
This commit is contained in:
@@ -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)
|
||||
// }
|
||||
// });
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user