using System.Collections;
|
using System.Collections.Generic;
|
|
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<ChatBubbleModel>(); }
|
}
|
|
public void Display(int line)
|
{
|
var configs = ChatBubbleBoxConfig.GetValues();
|
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);
|
}
|
}
|
}
|
}
|
}
|
|