feat(好友系统): 添加好友召唤功能及相关事件处理
- 在GameEvent枚举中添加ToCallFriend和CallFriend事件 - 在MissionHeroComp中添加好友召唤事件处理 - 在SingletonModuleComp中添加好友记录功能 - 更新icon.prefab界面以支持好友功能
This commit is contained in:
@@ -21,6 +21,7 @@ export class MissionHeroCompComp extends CCComp {
|
||||
this.on(GameEvent.FightReady,this.fight_ready,this)
|
||||
this.on(GameEvent.Zhaohuan,this.zhao_huan,this)
|
||||
this.on(GameEvent.MissionEnd,this.clear_heros,this)
|
||||
this.on(GameEvent.CallFriend,this.call_friend,this)
|
||||
}
|
||||
start() {
|
||||
// this.test_call()
|
||||
@@ -60,7 +61,10 @@ export class MissionHeroCompComp extends CCComp {
|
||||
// console.log("[MissionHeroComp]:zhaohuan",args)
|
||||
this.addHero(args.uuid,false)
|
||||
}
|
||||
|
||||
private call_friend(event: string, args: any){
|
||||
// console.log("[MissionHeroComp]:call_friend",args)
|
||||
this.addHero(args.uuid,false)
|
||||
}
|
||||
/** 添加英雄 */
|
||||
private addHero(uuid:number=1001,is_master:boolean=false) {
|
||||
// console.log("[MissionHeroComp]:addHero",uuid,is_zhaohuan)
|
||||
|
||||
Reference in New Issue
Block a user