using System.Collections; using System.Collections.Generic; using TableConfig; using UnityEngine; namespace Snxxz.UI { public class ChatBubbleCell : CellView { [SerializeField] ChatBubbleSelectBehaviour[] m_ChatBubbles; [SerializeField] int m_LineCount = 7; public int lineCount { get { return m_LineCount; } } ChatBubbleModel model { get { return ModelCenter.Instance.GetModel(); } } public void Display(int line) { var configs = Config.Instance.GetAllValues(); for (int i = 0; i < lineCount; i++) { var index = line * 7 + i; if (index < configs.Count) { m_ChatBubbles[i].gameObject.SetActive(true); m_ChatBubbles[i].Display(configs[i].ID); } else { m_ChatBubbles[i].gameObject.SetActive(false); } } } } }