feat(好友系统): 添加好友召唤功能及相关事件处理

- 在GameEvent枚举中添加ToCallFriend和CallFriend事件
- 在MissionHeroComp中添加好友召唤事件处理
- 在SingletonModuleComp中添加好友记录功能
- 更新icon.prefab界面以支持好友功能
This commit is contained in:
walkpan
2026-01-05 19:25:44 +08:00
parent df7b3d0082
commit 1cfd74062d
4 changed files with 267 additions and 16 deletions

View File

@@ -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)