Beispiel #1
0
        public void Update()
        {
            for (int i = 0; i < m_EmitTipItems.Count; i++)
            {
                if (m_EmitTipItems[i].IsFinish())
                {
                    EmitTip tipitem = m_EmitTipItems[i];

                    this.FUIComponent.GObject.asCom.RemoveChild(tipitem.m_comp);

                    m_EmitTipItems.RemoveAt(i);

                    m_EmitTipPool.Recycle(tipitem);

                    --i;
                }
            }
        }
Beispiel #2
0
        public void AddEmitTip(string text, PopMessageType type)
        {
            EmitTip item = m_EmitTipPool.Alloc(NewEmitTip);

            item.Init(type);

            m_EmitTipItems.Add(item);

            this.FUIComponent.GObject.asCom.AddChild(item.m_comp);

            GRichTextField textContent = item.m_comp.GetChild("n7").asRichTextField;

            textContent.text = text;

            SetTextContent(item.m_comp);

            Transition anim = item.GetAnim();

            if (anim != null)
            {
                anim.Play();
            }
        }