public MainViewModel() { // Add available pages and set page PageViewModels.Add(ViewModelLocator.MainMenu); PageViewModels.Add(ViewModelLocator.Game); PageViewModels.Add(ViewModelLocator.Settings); //todo CurrentPageViewModel = PageViewModels[0]; EventMediator.Subscribe(nameof(ViewModelLocator.MainMenu.GoToGameCommand), OnGoGameScreen); EventMediator.Subscribe(nameof(ViewModelLocator.Game.GoToMenuCommand), OnGoMenuScreen); EventMediator.Subscribe(nameof(ViewModelLocator.MainMenu.GoToExitCommand), OnGoExit); EventMediator.Subscribe(nameof(ViewModelLocator.MainMenu.GoToSettingsCommand), OnGoSettingsScreen); EventMediator.Subscribe(nameof(ViewModelLocator.Settings.GoToMenuCommand), OnGoMenuScreen); }
public CellDisplayList() { EventMediator.Subscribe(nameof(GameViewModel.GameEndedCommand), GameOverCB); }
public GameViewModel() : base() { EventMediator.Subscribe(nameof(ViewModelLocator.MainMenu.GoToGameCommand), StartGame); }