Exemplo n.º 1
0
        public void AddItem(SSchemeChatEmoticonData _sSchemeData)
        {
            if (!m_init)
            {
                return;
            }

            if (DefaultItem == null)
            {
                return;
            }

            GameObject itemGO = ResNode.InstantiateRes(DefaultItem);

            if (itemGO == null)
            {
                return;
            }

            ChatEmoticonItemBase item = AddEmoticonItemComponent(itemGO, _sSchemeData.eEmoticonType);

            if (item == null)
            {
                return;
            }

            item.SetData(_sSchemeData);
            item.transform.SetParent(ItemContainer, false);
            item.gameObject.SetActive(true);

            m_chatEmoticonItemList.Add(item);
        }
Exemplo n.º 2
0
        public virtual void SetData(SSchemeChatEmoticonData _sSchemeData)
        {
            emotionID   = _sSchemeData.nEmoticonID;
            serialID    = _sSchemeData.nEmoticonSerialID;
            emotionType = _sSchemeData.eEmoticonType;
            emotionKey  = _sSchemeData.szEmoticonKey;
            szCharInput = _sSchemeData.szCharInput;
            szTipsDesc  = _sSchemeData.szTipDesc;

            FilpBookAnim = this.GetComponent <UFlipBook>();

            if (FilpBookAnim != null)
            {
                FilpBookAnim.Init(emotionKey);
            }
        }
Exemplo n.º 3
0
        public override void SetData(SSchemeChatEmoticonData _sSchemeData)
        {
            base.SetData(_sSchemeData);

            UTooltipTrigger tipTrigger = this.gameObject.GetComponent <UTooltipTrigger>();

            if (tipTrigger == null)
            {
                tipTrigger = this.gameObject.AddComponent <UTooltipTrigger>(ETooltipStyle.ETS_ChatEmotion);
            }

            if (tipTrigger)
            {
                tipTrigger.SetText("bodyTxt", szTipsDesc);
            }
        }
Exemplo n.º 4
0
        public override void SetData(SSchemeChatEmoticonData _sSchemeData)
        {
            base.SetData(_sSchemeData);

            UTooltipTrigger tipTrigger = this.gameObject.GetComponent <UTooltipTrigger>();

            if (tipTrigger == null)
            {
                tipTrigger = this.gameObject.AddComponent <UTooltipTrigger>(ETooltipStyle.ETS_ChatEmotion);
            }

            if (tipTrigger)
            {
                string tip = "<color='#20c53b'>" + szCharInput + "</color>" + "    " + szTipsDesc;
                tipTrigger.SetText("bodyTxt", tip);
            }
        }