public void OnFinalize() { this._armyManagementVM?.OnFinalize(); this._mapDataSource.OnFinalize(); this._gauntletArmyManagementMovie?.Release(); this._movie.Release(); this._armyManagementVM = (ArmyManagementVM)null; this._gauntletLayer = (GauntletLayer)null; this._mapDataSource = (EntrepreneurMapVM)null; this._encyclopediaManager = (EncyclopediaScreenManager)null; this._mapScreen = (MapScreen)null; }
public void Initialize(MapScreen mapScreen) { this._mapScreen = mapScreen; this._mapNavigationHandler = new MapNavigationHandler(); this._mapDataSource = new EntrepreneurMapVM((INavigationHandler)this._mapNavigationHandler, (IMapStateHandler)this._mapScreen, new MapBarShortcuts() { EscapeMenuHotkey = Game.Current.GameTextManager.GetHotKeyGameText("GenericCampaignPanelsGameKeyCategory", "Exit").ToString(), CharacterHotkey = Game.Current.GameTextManager.GetHotKeyGameText("GenericCampaignPanelsGameKeyCategory", 30).ToString(), QuestHotkey = Game.Current.GameTextManager.GetHotKeyGameText("GenericCampaignPanelsGameKeyCategory", 35).ToString(), PartyHotkey = Game.Current.GameTextManager.GetHotKeyGameText("GenericCampaignPanelsGameKeyCategory", 36).ToString(), KingdomHotkey = Game.Current.GameTextManager.GetHotKeyGameText("GenericCampaignPanelsGameKeyCategory", 33).ToString(), ClanHotkey = Game.Current.GameTextManager.GetHotKeyGameText("GenericCampaignPanelsGameKeyCategory", 34).ToString(), InventoryHotkey = Game.Current.GameTextManager.GetHotKeyGameText("GenericCampaignPanelsGameKeyCategory", 31).ToString(), FastForwardHotkey = Game.Current.GameTextManager.GetHotKeyGameText("MapHotKeyCategory", 48).ToString(), PauseHotkey = Game.Current.GameTextManager.GetHotKeyGameText("MapHotKeyCategory", 46).ToString(), PlayHotkey = Game.Current.GameTextManager.GetHotKeyGameText("MapHotKeyCategory", 47).ToString() }, new Action(this.OpenArmyManagement)); this._gauntletLayer = new GauntletLayer(200, "GauntletLayer"); this.Layer = (ScreenLayer)this._gauntletLayer; this._movie = this._gauntletLayer.LoadMovie("MapBar", (ViewModel)this._mapDataSource); this._encyclopediaManager = mapScreen.EncyclopediaScreenManager; }