using Snxxz.UI; using System; using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class ChatTip : MonoBehaviour { private static ChatTip _inst = null; public static ChatTip Inst { get { return _inst; } } private void Awake() { _inst = this; InitCom(); } private GameObject chatPrefab; private GameObject chatContent; private GameObject chatMask; private GameObject chatMaskRay; private GameObject chatUpMaskRay; private GameObject chatUp; private Button chatUpBtn; private Image chatUpImg; private bool isChatUp = false; [SerializeField] Vector2 m_ChatLowSize = Vector2.zero; [SerializeField] Vector2 m_ChatHighSize = Vector2.zero; public bool IsChatUp { get { return isChatUp; } } public event Action OnChatUpEvent; private Image chatBg; private ScrollerController chatUpCtrl; private RichText destText; private List chatUpDataList; private List chatItems = new List(ChatCtrl.CHAT_TIP_CNT); void InitCom() { chatBg = this.GetComponent("Image"); chatContent = transform.Find("ChatMask/ChatContent").gameObject; chatPrefab = chatContent.transform.Find("ChatText").gameObject; chatMask = transform.Find("ChatMask").gameObject; chatMaskRay = chatMask.transform.Find("Ray").gameObject; UIEventTrigger.Get(chatMaskRay).OnNoParamsClick = OnChatClick; chatUpBtn = this.GetComponent