feat(英雄系统): 添加伙伴召唤功能和可选择的英雄与技能列表
- 在SkillSet和heroSet中分别添加CanSelectSkills和CanSelectHeros常量 - 修改MissionHeroComp使用oops.message管理CallFriend事件 - 在MissionCardComp中新增Partner卡牌类型,支持召唤伙伴功能 - 完善事件处理逻辑,添加对应的事件监听和销毁
This commit is contained in:
@@ -6,6 +6,7 @@ import { smc } from "../common/SingletonModuleComp";
|
||||
import { Timer } from "db://oops-framework/core/common/timer/Timer";
|
||||
import { GameEvent } from "../common/config/GameEvent";
|
||||
import { HeroPos } from "../common/config/heroSet";
|
||||
import { oops } from "../../../../extensions/oops-plugin-framework/assets/core/Oops";
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
/** 视图层对象 */
|
||||
@@ -21,8 +22,14 @@ 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)
|
||||
// this.on(GameEvent.CallFriend,this.call_friend,this)
|
||||
oops.message.on(GameEvent.CallFriend,this.call_friend,this)
|
||||
}
|
||||
|
||||
onDestroy(){
|
||||
oops.message.off(GameEvent.CallFriend,this.call_friend,this)
|
||||
}
|
||||
|
||||
start() {
|
||||
// this.test_call()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user