Inheritance: MonoBehaviour
コード例 #1
0
ファイル: UIManager.cs プロジェクト: NickyFot/GameOff
    //-----------------------------------------------------------------

    public void SetupUI()
    {
        MainCanvas = GameObject.Find("Canvas");

        MainMenu     = new MainMenuUI();
        PlaySettings = new PlaySettingsUI();
        Credits      = new CreditsUI();
        GameUI       = new InGameUI();
    }
コード例 #2
0
    private void InitializePanelContent(string panelName, string previousPanelName)
    {
        switch (panelName)
        {
        case "MainMenuPanel":
            UpdatePlayerInfo();
            break;

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

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

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

        case "BrowseRoomsPanel":
            Network.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;
        }
    }
コード例 #3
0
    private void InitializePanelContent(string panelName, string previousPanelName)
    {
        switch (panelName)
        {
        case "MainMenuPanel":
            ClearBatchAiSquadsTestingMode();
            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":
            Global.SquadBuilder.CurrentSquad.ClearAll();
            Global.SquadBuilder.View.ShowFactionsImages();
            break;

        case "SquadBuilderPanel":
            Global.SquadBuilder.View.ShowShipsAndUpgrades();
            Global.SquadBuilder.View.UpdateNextButton();
            break;

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

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

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

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

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

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

        case "AvatarsPanel":
            InitializePlayerCustomization();
            break;

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

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

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

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

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

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

        case "BrowsePopularSquadsVariantsPanel":
            PopularSquads.LoadPopularSquadsVariants();
            break;

        case "BrowseAvatarsPanel":
            AvatarsManager.LoadAvatars(Faction.None);
            break;
        }
    }