示例#1
0
 public void Finish(int w)
 {
     panel.CalcSize();
     transform.GetChild(0).GetComponent <RectTransform>().sizeDelta = new Vector2(w, panel.panel.GetComponent <RectTransform>().sizeDelta.y + 48);
     gameObject.SetActive(true);
     gameObject.GetComponent <Image>().color = new Color(0, 0, 0, 0);
     gameObject.GetComponent <Image>().DOFade(0.33f, 10);
 }
示例#2
0
        private void ShowDetail()
        {
            if (infoPanel.transform.childCount > 0)
            {
                UIHelper.ClearChild(infoPanel);
            }

            PanelBuilder p = PanelBuilder.Create(infoPanel.transform);

            selectedElement.ShowDetail(p);
            p.CalcSize();
            NAudio.Play(selectedElement.audioSwitch);
        }
示例#3
0
        private void ShowDetail()
        {
            if (infoPanel.transform.childCount > 0)
            {
                foreach (Transform child in infoPanel.transform)
                {
                    Destroy(child.gameObject);
                }
                ;
            }

            PanelBuilder p = PanelBuilder.Create(infoPanel.transform);

            selectedElement.ShowDetail(p);
            p.CalcSize();
            NAudio.Play(selectedElement.audioSwitch);
        }