public void OnEnter() { Service.EditBaseController.Enable(true); Service.BuildingController.EnterMoveMode(this.autoLiftSelectedBuilding); Service.WorldInitializer.View.SetEditModeVantage(true); Service.WorldInitializer.View.DrawWorldGrid(); HudConfig hudConfig = new HudConfig(new string[] { "PlayerInfo", "Currency", "Droids", "Crystals", "ButtonExitEdit", "ButtonStore" }); HUD hUD = Service.UXController.HUD; if (!GameConstants.DISABLE_BASE_LAYOUT_TOOL && !hUD.BaseLayoutToolView.IsBuildingPendingPurchase) { hudConfig.Add("BtnActivateStash"); } hUD.ConfigureControls(hudConfig); hUD.BaseLayoutToolView.RefreshNewJewelStatus(); Service.EventManager.SendEvent(EventId.EnterEditMode, null); Service.ChampionController.DestroyAllChampionEntities(); }
public void ConfigureBaseLayoutToolStateHUD() { HudConfig hudConfig = new HudConfig(new string[] { "BtnCancelStash", "BtnSaveLayout", "BtnStashAll", "BtnStashMode", "StashPanelHolder", "SpriteStashTray", "LabelTitleTopLeft" }); if (Service.Get <GameStateMachine>().CurrentState is WarBaseEditorState) { this.bltTitleLabel.Text = Service.Get <Lang>().Get("WAR_BASE_LAYOUT_TITLE", new object[0]); hudConfig.Add("BtnInfoWarBE"); } else { this.bltTitleLabel.Text = Service.Get <Lang>().Get("blt_title", new object[0]); } this.hud.ConfigureControls(hudConfig); }
public void OnEnter() { BattleController battleController = Service.BattleController; battleController.StartBattle(); Service.BattleRecordController.StartRecord(); HudConfig hudConfig = null; BattleType type = battleController.GetCurrentBattle().Type; switch (type) { case BattleType.Pvp: case BattleType.PveAttack: case BattleType.PveFue: case BattleType.ClientBattle: hudConfig = new HudConfig(new string[] { "Currency", "OpponentInfo", "ButtonEndBattle", "LabelTimeLeft", "DamageStars", "LabelBaseNameOpponent", "TroopsGrid", "LabelDeployInstructions", "LabelCurrencyValueOpponent" }); break; case BattleType.PveDefend: hudConfig = new HudConfig(new string[] { "Currency", "PlayerInfo", "ButtonEndBattle", "LabelTimeLeft", "DamageStars", "LabelBaseNameOpponent", "TroopsGrid", "LabelDeployInstructions", "LabelCurrencyValueOpponent" }); break; case BattleType.PveBuffBase: case BattleType.PvpAttackSquadWar: hudConfig = new HudConfig(new string[] { "OpponentInfo", "BuffsYoursSquadWars", "ButtonEndBattle", "LabelTimeLeft", "DamageStars", "LabelBaseNameOpponent", "TroopsGrid", "WarAttackStarted" }); if (type != BattleType.PveBuffBase) { hudConfig.Add("BuffsOpponentsSquadWars"); } break; } Service.UXController.HUD.ConfigureControls(hudConfig); Service.BILoggingController.SchedulePerformanceLogging(false); }
public virtual void OnEnter() { Service.Get <UXController>().MiscElementsManager.RemoveGalaxyTournamentStatus(); HudConfig hudConfig = null; BattleType battleType = this.battleData.BattleType; switch (battleType) { case BattleType.Pvp: hudConfig = new HudConfig(new string[] { "Currency", "OpponentInfo", "MedalInfo", "ButtonHome", "LabelBaseNameOpponent", "TroopsGrid", "LabelDeployInstructions", "LabelCurrencyValueOpponent" }); if (!this.battleData.IsRevenge) { hudConfig.Add("ButtonNextBattle"); } break; case BattleType.PveDefend: hudConfig = new HudConfig(new string[] { "Currency", "PlayerInfo", "LabelBaseNameOpponent", "LabelCurrencyValueOpponent", "TroopsGrid", "LabelDeployInstructions" }); break; case BattleType.PveAttack: case BattleType.PveFue: case BattleType.ClientBattle: hudConfig = new HudConfig(new string[] { "Currency", "OpponentInfo", "ButtonHome", "LabelBaseNameOpponent", "TroopsGrid", "LabelDeployInstructions", "LabelCurrencyValueOpponent" }); break; case BattleType.PveBuffBase: case BattleType.PvpAttackSquadWar: { hudConfig = new HudConfig(new string[] { "OpponentInfo", "LabelBaseNameOpponent", "WarAttack" }); SquadWarManager warManager = Service.Get <SquadController>().WarManager; bool flag = this.battleData.Attacker.PlayerFaction == this.battleData.Defender.PlayerFaction; SquadWarStatusType currentStatus = warManager.GetCurrentStatus(); if (!flag) { hudConfig.Add("BuffsYoursSquadWars"); } if (battleType != BattleType.PveBuffBase) { hudConfig.Add("BuffsOpponentsSquadWars"); } if (this.battleData.Attacker.GuildId != this.battleData.Defender.GuildId && !warManager.IsCurrentlyScoutingOwnedBuffBase()) { hudConfig.Add("WarAttackOpponent"); if (currentStatus == SquadWarStatusType.PhaseAction) { hudConfig.Add("TroopsGrid"); } } if (currentStatus == SquadWarStatusType.PhasePrep) { if (battleType == BattleType.PvpAttackSquadWar) { Service.Get <BuildingController>().EnterSelectMode(); } else { Service.Get <BuildingController>().ExitAllModes(); } } break; } } if (hudConfig != null) { Service.Get <UXController>().HUD.ConfigureControls(hudConfig); } }