mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-09-27 02:36:14 +00:00
修复PVP 切换地图重置数据
This commit is contained in:
@@ -24,6 +24,8 @@ export class MainSreepsList extends Component {
|
||||
app.event.on(GOnHookManagerEvent.ADD_KILL_SREEP,this.onAddSreep,this);
|
||||
//监听 野怪删除
|
||||
app.event.on(GOnHookManagerEvent.DEL_KILL_SREEP,this.onDelSreep,this);
|
||||
//监听 野怪数据重置
|
||||
app.event.on(GOnHookManagerEvent.RESET_DATA,this.onResetData,this);
|
||||
|
||||
//添加子节点事件
|
||||
this.views.addItemEvent(NodeEventType.TOUCH_END,this.onClickItem.bind(this));
|
||||
@@ -34,9 +36,14 @@ export class MainSreepsList extends Component {
|
||||
|
||||
//取消监听
|
||||
app.event.off(GOnHookManagerEvent.ADD_KILL_SREEP,this.onAddSreep,this);
|
||||
app.event.on(GOnHookManagerEvent.DEL_KILL_SREEP,this.onDelSreep,this);
|
||||
app.event.off(GOnHookManagerEvent.DEL_KILL_SREEP,this.onDelSreep,this);
|
||||
app.event.off(GOnHookManagerEvent.RESET_DATA,this.onResetData,this);
|
||||
}
|
||||
|
||||
//重置数据
|
||||
onResetData(){
|
||||
this.views.refreshData([]);
|
||||
}
|
||||
|
||||
//添加野怪
|
||||
onAddSreep(sreep:GOnHookPet){
|
||||
|
Reference in New Issue
Block a user