public void InitializeModuleUI() { DebugBot.DebugFunctionCall("TModuleUI; InitializeModuleUI(); ", debugFunctionCalls); Trainer trainerRef = gameController.masterTrainer; if (trainerRef.PlayerList == null) { trainerRef.InitializePlayerList(); } if (trainerRef.PlayerList[trainerRef.CurPlayer - 1].masterPopulation == null) { //trainerRef.PlayerList[trainerRef.CurPlayer-1].InitializeNewPopulation(); } // Store sub-panel scripts in a variable panelPlayersScript = panelPlayers.GetComponent <TrainerPlayersUI>(); panelMenuBarScript = panelMenuBar.GetComponent <TrainerMenuBarUI>(); panelDataViewScript = panelDataView.GetComponent <TrainerDataViewUI>(); panelMenuScript = panelMenu.GetComponent <TrainerMenuUI>(); panelWarningScript = panelWarning.GetComponent <TrainerWarningUI>(); panelPopulationScript = panelPopulation.GetComponent <TrainerPopulationUI>(); panelNewPopulationScript = panelNewPopulation.GetComponent <TrainerNewPopulationUI>(); panelSavePopulationScript = panelSavePopulation.GetComponent <TrainerSavePopulationUI>(); panelLoadPopulationScript = panelLoadPopulation.GetComponent <TrainerLoadPopulationUI>(); panelCrossoverScript = panelCrossover.GetComponent <TrainerCrossoverUI>(); panelDataVisScript = panelDataVisualizations.GetComponent <TrainerDataVisUI>(); panelTrialsScript = panelTrials.GetComponent <TrainerTrialsUI>(); panelFitnessScript = panelFitnessFunction.GetComponent <TrainerFitnessUI>(); panelMiniGameScript = panelMiniGameSettings.GetComponent <TrainerMiniGameUI>(); panelTextLogScript = panelTextLog.GetComponent <TrainerTextLogUI>(); panelTrainingModifierScript = panelTrainingModifiers.GetComponent <TrainerTrainingModifiersUI>(); SetAllPanelsFromTrainerData(); // Updates UI elements in every Trainer sub-panel based on current data UpdatePanelVisibility(); // Handles which panels should be currently visible }
public void InitializeModuleUI() { DebugBot.DebugFunctionCall("TModuleUI; InitializeModuleUI(); ", debugFunctionCalls); Trainer trainerRef = gameController.masterTrainer; if(trainerRef.PlayerList == null) { trainerRef.InitializePlayerList(); } if(trainerRef.PlayerList[trainerRef.CurPlayer-1].masterPopulation == null) { //trainerRef.PlayerList[trainerRef.CurPlayer-1].InitializeNewPopulation(); } // Store sub-panel scripts in a variable panelPlayersScript = panelPlayers.GetComponent<TrainerPlayersUI>(); panelMenuBarScript = panelMenuBar.GetComponent<TrainerMenuBarUI>(); panelDataViewScript = panelDataView.GetComponent<TrainerDataViewUI>(); panelMenuScript = panelMenu.GetComponent<TrainerMenuUI>(); panelWarningScript = panelWarning.GetComponent<TrainerWarningUI>(); panelPopulationScript = panelPopulation.GetComponent<TrainerPopulationUI>(); panelNewPopulationScript = panelNewPopulation.GetComponent<TrainerNewPopulationUI>(); panelSavePopulationScript = panelSavePopulation.GetComponent<TrainerSavePopulationUI>(); panelLoadPopulationScript = panelLoadPopulation.GetComponent<TrainerLoadPopulationUI>(); panelCrossoverScript = panelCrossover.GetComponent<TrainerCrossoverUI>(); panelDataVisScript = panelDataVisualizations.GetComponent<TrainerDataVisUI>(); panelTrialsScript = panelTrials.GetComponent<TrainerTrialsUI>(); panelFitnessScript = panelFitnessFunction.GetComponent<TrainerFitnessUI>(); panelMiniGameScript = panelMiniGameSettings.GetComponent<TrainerMiniGameUI>(); panelTextLogScript = panelTextLog.GetComponent<TrainerTextLogUI>(); panelTrainingModifierScript = panelTrainingModifiers.GetComponent<TrainerTrainingModifiersUI>(); SetAllPanelsFromTrainerData(); // Updates UI elements in every Trainer sub-panel based on current data UpdatePanelVisibility(); // Handles which panels should be currently visible }