适配ecs调整

This commit is contained in:
walker 2023-12-25 13:28:24 +08:00
parent e179497de9
commit 7e9a1816fa

View File

@ -12,7 +12,7 @@ func NewStateMs(vs *memory.VerifySimulation) ms_api.MsgTask {
return ms_api.NewMonitorTask("仿真状态", func() { return ms_api.NewMonitorTask("仿真状态", func() {
ecs.WorldStateChangeEvent.Subscribe(vs.World, func(_ ecs.World, e ecs.WorldStateChange) { ecs.WorldStateChangeEvent.Subscribe(vs.World, func(_ ecs.World, e ecs.WorldStateChange) {
switch e.NewState { switch e.NewState {
case ecs.WorldClose: case ecs.WorldClosed:
mqtt.PubSimulationState(vs.SimulationId, &state.SimulationStatus{ mqtt.PubSimulationState(vs.SimulationId, &state.SimulationStatus{
SimulationId: vs.SimulationId, SimulationId: vs.SimulationId,
State: state.SimulationStatus_DESTROY, State: state.SimulationStatus_DESTROY,