Skip to content

Commit 59c0cfe

Browse files
committed
Change message subscription to persistent
1 parent 32939c8 commit 59c0cfe

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

MicroEngineerProject/MicroEngineer/Managers/MessageManager.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,22 +32,22 @@ public void SubscribeToMessages()
3232
Utility.RefreshGameManager();
3333

3434
// While in OAB we use the VesselDeltaVCalculationMessage event to refresh data as it's triggered a lot less frequently than Update()
35-
Utility.MessageCenter.Subscribe<VesselDeltaVCalculationMessage>(new Action<MessageCenterMessage>(obj => this.RefreshStagingDataOAB((VesselDeltaVCalculationMessage)obj)));
35+
Utility.MessageCenter.PersistentSubscribe<VesselDeltaVCalculationMessage>(new Action<MessageCenterMessage>(obj => this.RefreshStagingDataOAB((VesselDeltaVCalculationMessage)obj)));
3636

3737
// We are loading layout state when entering Flight or OAB game state
38-
Utility.MessageCenter.Subscribe<GameStateEnteredMessage>(new Action<MessageCenterMessage>(this.GameStateEntered));
38+
Utility.MessageCenter.PersistentSubscribe<GameStateEnteredMessage>(new Action<MessageCenterMessage>(this.GameStateEntered));
3939

4040
// We are saving layout state when exiting from Flight or OAB game state
41-
Utility.MessageCenter.Subscribe<GameStateLeftMessage>(new Action<MessageCenterMessage>(this.GameStateLeft));
41+
Utility.MessageCenter.PersistentSubscribe<GameStateLeftMessage>(new Action<MessageCenterMessage>(this.GameStateLeft));
4242

4343
// Sets the selected node index to the newly created node
44-
Utility.MessageCenter.Subscribe<ManeuverCreatedMessage>(new Action<MessageCenterMessage>(this.OnManeuverCreatedMessage));
44+
Utility.MessageCenter.PersistentSubscribe<ManeuverCreatedMessage>(new Action<MessageCenterMessage>(this.OnManeuverCreatedMessage));
4545

4646
// Resets node index
47-
Utility.MessageCenter.Subscribe<ManeuverRemovedMessage>(new Action<MessageCenterMessage>(this.OnManeuverRemovedMessage));
47+
Utility.MessageCenter.PersistentSubscribe<ManeuverRemovedMessage>(new Action<MessageCenterMessage>(this.OnManeuverRemovedMessage));
4848

4949
// Torque update for StageInfoOAB
50-
Utility.MessageCenter.Subscribe<PartManipulationCompletedMessage>(new Action<MessageCenterMessage>(this.OnPartManipulationCompletedMessage));
50+
Utility.MessageCenter.PersistentSubscribe<PartManipulationCompletedMessage>(new Action<MessageCenterMessage>(this.OnPartManipulationCompletedMessage));
5151
}
5252

5353
private void OnManeuverCreatedMessage(MessageCenterMessage message)

0 commit comments

Comments
 (0)