lcy
2025-12-03 b9a6e7e896b451e9c915e782a1789b2afe079cc9
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
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);
    }
}