Exemplo n.º 1
0
        protected override void Awake()
        {
            if (!m_audioSource)
            {
                m_audioSource = this.GetComponent <AudioSource>();
            }
            m_controlType   = ControlType.IMCCanvas;
            m_containerType = ContainerType.Container;

            IMCUIManager.Instance.CanvasList.Add(this);
            for (int i = 0; i < this.transform.childCount; i++)
            {
                IMCForm tempform = this.transform.GetChild(i).gameObject.GetComponent <IMCForm>();
                if (tempform)
                {
                    tempform.canvas = this;
                    forms.Add(tempform);

                    if (tempform.showOnAwake)
                    {
                        tempform.Show();
                    }
                }
            }
            for (int i = 0; i < forms.Count; i++)
            {
                forms[i].Initialize();
            }
        }