修复 同时刷新卡牌bug

This commit is contained in:
2024-08-26 13:49:56 +08:00
parent e859e14ac7
commit 7b618eb645
9 changed files with 596 additions and 1733 deletions

View File

@@ -64,8 +64,8 @@ export class HeroCard extends ecs.Entity {
// node.getChildByName("avatar").setScale(node.getChildByName("avatar").scale.x*scale, node.getChildByName("avatar").scale.y, node.getChildByName("avatar").scale.z);
node.setPosition(pos)
resources.load(url, SpriteAtlas, (err: any, atlas) => {
console.log("hero_card load",node)
const sprite = node.getChildByName("hero").getComponent(Sprite);
sprite.spriteFrame = atlas.getSpriteFrame(pathName);
});