private bool SecondInitialize() { if (!Initializer.SecondInitialize()) { return(false); } Global.GetProvider <AMissionStartingManager>().AddHandler(new MissionStartingHandler()); BattleMiniMapGameKeyCategory.RegisterGameKeyCategory(); var menuClassCollection = AMenuManager.Get().MenuClassCollection; AMenuManager.Get().OnMenuClosedEvent += BattleMiniMapConfig.OnMenuClosed; menuClassCollection.AddOptionClass( BattleMiniMapOptionClassFactory.CreateOptionClassProvider(menuClassCollection)); return(true); }
public override void OnMissionScreenTick(float dt) { base.OnMissionScreenTick(dt); if (_boundaryChanged) { _boundaryChanged = false; if (!MiniMap.Instance.IsValid) { MiniMap.Instance.InitializeMapRange(Mission.Current, true); } } bool toggleMapKeyDown = false; var toggleMapLongPressKey = BattleMiniMapGameKeyCategory.GetKey(GameKeyEnum.ToggleMapLongPress); var toggleMapKey = BattleMiniMapGameKeyCategory.GetKey(GameKeyEnum.ToggleMap); if (BattleMiniMapConfig.Get().EnableToggleMapLongPressKey&& toggleMapLongPressKey.IsKeyDown(Input)) { toggleMapKeyDown = true; } else if (toggleMapKey.IsKeyPressed(Input)) { BattleMiniMapConfig.Get().ShowMap = !BattleMiniMapConfig.Get().ShowMap; } _dataSource.UpdateEnabled(dt, MiniMap.Instance.IsValid && ((BattleMiniMapConfig.Get().ShowMap ^ toggleMapKeyDown) || _isOrderViewOpened && BattleMiniMapConfig.Get().ShowMapWhenCommanding)); _dataSource.UpdateCamera(); if (_timer.Check(true)) { _dataSource.UpdateData(); } }