英雄 技能 碎片重做, 商品页完善
This commit is contained in:
@@ -17,6 +17,14 @@ export class SChipComp extends Component {
|
||||
}
|
||||
|
||||
update_data(uuid:number,num:number=0){
|
||||
|
||||
if(num > 0){
|
||||
this.node.getChildByName("num").getComponent(Label).string = num.toString();
|
||||
}else{
|
||||
this.node.getChildByName("num").getComponent(Label).string = "";
|
||||
}
|
||||
|
||||
if(uuid == 0){ return;}
|
||||
var icon_path = "game/skills/skill_icon"
|
||||
// console.log("update_data",SkillSet[uuid].path)
|
||||
resources.load(icon_path, SpriteAtlas, (err: any, atlas) => {
|
||||
@@ -24,11 +32,7 @@ export class SChipComp extends Component {
|
||||
// console.log("update_data",atlas,sprite)
|
||||
sprite.spriteFrame = atlas.getSpriteFrame(SkillSet[uuid].path);
|
||||
});
|
||||
if(num > 0){
|
||||
this.node.getChildByName("num").getComponent(Label).string = num.toString();
|
||||
}else{
|
||||
this.node.getChildByName("num").getComponent(Label).string = "";
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user