using UnityEngine;
|
|
public class ChatSettingButton : MonoBehaviour
|
{
|
[SerializeField] ButtonEx btnSelect;
|
[SerializeField] ImageEx imgSelect;
|
private ChatChannel channelType;
|
private bool isAvtive;
|
ChatManager manager { get { return ChatManager.Instance; } }
|
void Awake()
|
{
|
btnSelect.SetListener(() =>
|
{
|
isAvtive = !isAvtive;
|
manager.SetBulletSetting(channelType, isAvtive);
|
imgSelect.SetActive(isAvtive);
|
});
|
}
|
|
public void SetChannelType(ChatChannel type)
|
{
|
channelType = type;
|
isAvtive = manager.GetBulletSetting(channelType);
|
imgSelect.SetActive(isAvtive);
|
}
|
}
|