Ejemplo n.º 1
0
    public void InitializeBuildingInformation(BuildingInformationData newInformation)
    {
        currentBuildingInformation = new BuildingInformationData();
        currentBuildingInformation = newInformation;

        SetupInformationPages();
    }
    public void OpenPanel(BuildingType buildingType)
    {
        if (currentBuildingPanel != null)
        {
            currentBuildingPanel.transform.parent.gameObject.SetActive(false);
            currentBuildingPanel.gameObject.SetActive(false);
        }

        BaseSceneManager        tmp          = TransitionManager.GetInstance.currentSceneManager;
        BuildingInformationData buildingInfo = tmp.buildingInformationStorage.ObtainBuildingOperation(buildingType);

        currentBuildingPanel = buildingPanels.Find(x => x.buildingType == buildingType);

        if (currentBuildingPanel != null)
        {
            currentBuildingPanel.gameObject.SetActive(true);
            currentBuildingPanel.transform.parent.gameObject.SetActive(true);

            currentBuildingPanel.InitializeBuildingInformation(buildingInfo);
            currentBuildingPanel.UpdatePages(selectedCardIdx);
        }
    }