Ejemplo n.º 1
0
    private void InitializePanelContent(string panelName, string previousPanelName)
    {
        switch (panelName)
        {
        case "MainMenuPanel":
            UpdatePlayerInfo();
            break;

        case "OptionsPanel":
            OptionsUI.Instance.InitializeOptionsPanel();
            break;

        case "StatsPanel":
            StatsUI.Instance.InitializeStatsPanel();
            break;

        case "ModsPanel":
            ModsManager.InitializePanel();
            break;

        case "CreditsPanel":
            CreditsUI.InitializePanel();
            break;

        case "BrowseRoomsPanel":
            BrowseMatches();
            break;

        case "SelectFactionPanel":
            SquadBuilder.SetCurrentPlayerFaction(Faction.None);
            SquadBuilder.ClearShipsOfPlayer(SquadBuilder.CurrentPlayer);
            SquadBuilder.ShowFactionsImages();
            break;

        case "SquadBuilderPanel":
            SquadBuilder.CheckAiButtonVisibility();
            SquadBuilder.UpdateSquadName("SquadBuilderPanel");
            SquadBuilder.ShowShipsAndUpgrades();
            SquadBuilder.UpdateNextButton();
            break;

        case "SelectShipPanel":
            SquadBuilder.ShowShipsFilteredByFaction();
            break;

        case "SelectPilotPanel":
            SquadBuilder.ShowPilotsFilteredByShipAndFaction();
            break;

        case "ShipSlotsPanel":
            SquadBuilder.ShowPilotWithSlots();
            break;

        case "SelectUpgradePanel":
            SquadBuilder.ShowUpgradesList();
            break;

        case "SquadronOptionsPanel":
            SquadBuilder.UpdateSquadName("SquadronOptionsPanel");
            break;

        case "BrowseSavedSquadsPanel":
            SquadBuilder.BrowseSavedSquads();
            break;

        case "SaveSquadronPanel":
            SquadBuilder.PrepareSaveSquadronPanel();
            break;

        case "AvatarsPanel":
            InitializePlayerCustomization();
            break;

        case "EditionPanel":
            ShowActiveEdition(Options.Edition);
            break;

        case "ShipInfoPanel":
            SquadBuilder.ShowShipInformation();
            break;

        case "SkinsPanel":
            SquadBuilder.ShowSkinsPanel();
            break;

        case "ChosenObstaclesPanel":
            SquadBuilder.ShowChosenObstaclesPanel();
            break;

        case "BrowseObstaclesPanel":
            SquadBuilder.ShowBrowseObstaclesPanel();
            break;

        case "BrowsePopularSquadsPanel":
            if (previousPanelName == "SquadOptionsPanel")
            {
                PopularSquads.LastChosenFaction = "All";
            }
            PopularSquads.LoadPopularSquads();
            break;

        case "BrowsePopularSquadsVariantsPanel":
            PopularSquads.LoadPopularSquadsVariants();
            break;
        }
    }
Ejemplo n.º 2
0
 public void SetFaction(string factionChar)
 {
     PopularSquads.SetFaction(factionChar);
 }