取消掉副英雄
This commit is contained in:
@@ -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){
|
||||
|
||||
Reference in New Issue
Block a user