清理掉 missioncomp的 抽卡相关的 游戏逻辑
This commit is contained in:
@@ -12,49 +12,27 @@ const { ccclass, property } = _decorator;
|
||||
@ecs.register('MissionHome', false)
|
||||
export class MissionHomeComp extends CCComp {
|
||||
|
||||
heros:any[]=[];
|
||||
heros_pos:any=[
|
||||
{uuid:0,px:-100},
|
||||
{uuid:0,px:-200},
|
||||
{uuid:0,px:-300},
|
||||
]
|
||||
|
||||
protected onLoad(): void {
|
||||
this.on(GameEvent.MissionEnd,this.mission_end,this)
|
||||
}
|
||||
/** 视图层逻辑代码分离演示 */
|
||||
start() {
|
||||
// var entity = this.ent as ecs.Entity; // ecs.Entity 可转为当前模块的具体实体对象
|
||||
// this.on(ModuleEvent.Cmd, this.onHandler, this);
|
||||
this.load_ui_heros()
|
||||
|
||||
this.home_active()
|
||||
}
|
||||
|
||||
to_start(){
|
||||
|
||||
}
|
||||
|
||||
|
||||
start_mission() {
|
||||
for(let i=0;i<this.heros.length;i++){
|
||||
this.heros[i].to_destroy()
|
||||
}
|
||||
this.heros=[]
|
||||
this.heros_pos=[
|
||||
{uuid:0,px:-100},
|
||||
{uuid:0,px:-200},
|
||||
{uuid:0,px:-300},
|
||||
]
|
||||
oops.message.dispatchEvent(GameEvent.MissionStart, {})
|
||||
this.node.active=false;
|
||||
}
|
||||
mission_end(){
|
||||
this.home_active()
|
||||
}
|
||||
home_active(){
|
||||
this.node.active=true
|
||||
oops.message.dispatchEvent(GameEvent.UpdateHero, {})
|
||||
}
|
||||
|
||||
load_ui_heros(){
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/** 视图对象通过 ecs.Entity.remove(ModuleViewComp) 删除组件是触发组件处理自定义释放逻辑 */
|
||||
|
||||
Reference in New Issue
Block a user