public void BeginBuildPhaseUI(IList <BuildingBlock> buildingBlocks)
        {
            uiBuildingBlockAnchor.Clear();
            ui3DOverlayBuildingBlockContainer.Clear();

            foreach (var buildingBlock in buildingBlocks)
            {
                GameObject      uiElement       = Instantiate(uiBuildingBlockPrefab, uiBuildingBlockAnchor);
                UIBuildingBlock uiBuildingBlock = uiElement.GetComponent <UIBuildingBlock>();
                GameObject      icon3D          = Instantiate(buildingBlock.RoundBuildingBlockTemplate.Template.Icon3DPrefab, ui3DOverlayBuildingBlockContainer);
                icon3D.transform.localScale = buildingBlock.RoundBuildingBlockTemplate.Template.Scale * buildingBlock.RoundBuildingBlockTemplate.Template.Icon3DScale;

                uiBuildingBlock.Initialize(buildingBlock, icon3D);
                buildingBlock.SetUIElement(uiBuildingBlock);
            }

            animator.SetTrigger("Reveal");
        }
Exemple #2
0
 private void UpdateUI()
 {
     UIBuildingBlock.UpdateUI();
 }
Exemple #3
0
 public void SetUIElement(UIBuildingBlock uiBuildingBlock)
 {
     this.UIBuildingBlock = uiBuildingBlock;
 }