yyl
2025-06-09 b9751b2f076ee050fe5b685e91ae4fc4469b1015
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using EnhancedUI.EnhancedScroller;
 
    public class ChatExtraOneCell : ScrollerUI
    {
        [SerializeField] RichText chatText;
 
        public override void Refresh(CellView cell)
        {
            ChatData _data = ChatCenter.Instance.GetChatData(ChatManager.Instance.presentChatType, cell.index);
            if (_data == null)
            {
                return;
            }
            if (_data.infoList != null)
            {
                chatText.SetExtenalData(_data.infoList);
            }
            chatText.text = _data.content;
            switch (_data.detailType)
            {
                case ChatInfoType.FairyQuestion:
                    chatText.alignment = TextAnchor.MiddleLeft;
                    break;
                default:
                    chatText.alignment = TextAnchor.MiddleCenter;
                    break;
            }
        }
    }