取消掉副英雄

This commit is contained in:
panw
2025-07-14 16:53:39 +08:00
parent 0815d64f3c
commit fbcd12a5b9
19 changed files with 89 additions and 202 deletions

View File

@@ -23,7 +23,6 @@ export class BarCompComp extends CCComp {
/** 视图层逻辑代码分离演示 */
protected onLoad(): void {
this.on(GameEvent.FightReady,this.readay,this)
this.on(GameEvent.FriendCalled,this.friend_called,this)
this.on(GameEvent.MasterCalled,this.master_called,this)
this.on(GameEvent.APChange,this.ap_change,this)
@@ -48,15 +47,7 @@ export class BarCompComp extends CCComp {
sprite.spriteFrame = atlas.getSpriteFrame(HeroInfo[data.uuid].path);
});
}
private friend_called(e:any,data:any){
this.node.getChildByName("fbar").active=true
let show=this.node.getChildByName("fbar").getChildByName("hero")
var icon_path = "game/heros/herois"
resources.load(icon_path, SpriteAtlas, (err: any, atlas) => {
const sprite = show.getChildByName("icon").getComponent(Sprite);
sprite.spriteFrame = atlas.getSpriteFrame(HeroInfo[data.uuid].path);
});
}
private ap_change(e:any,data:any){
console.log("[barcomp]:ap_change",data)
if(data.is_master==true){