public override void Init()
        {
            base.Init();

            view          = UINode as WorldSessionView;
            chatDataStore = DataStoreManager.Instance.FindOrBindDataStore <ChatDataStore>();

            memberItemContollerList   = new List <ChatMemberItemController>();
            messageItemControllerList = new List <ChatMessageItemController>();
            UpdateMemberList();
        }
Exemplo n.º 2
0
        public override void Init()
        {
            Instance      = this;
            chatDataStore = DataStoreManager.Instance.FindOrBindDataStore <ChatDataStore>();

            NetworkSystem.Instance.RegisterNetworkEvent(Common.CSChatSessionChangedNtf, OnCSChatSessionChangedNtf);
            NetworkSystem.Instance.RegisterNetworkEvent(Common.CSGetSessionInfoRes, OnCSGetSessionInfoRes);
            NetworkSystem.Instance.RegisterNetworkEvent(Common.CSNewChatMessageNtf, OnCSNewChatMessageNtf);

            GlobalEventSystem.Instance.Bind(EventId.onMainuiOpenCallback, OnMainuiOpenCallBack);
        }
Exemplo n.º 3
0
        public override void Init()
        {
            base.Init();

            view          = UINode as ChatView;
            chatDataStore = DataStoreManager.Instance.FindOrBindDataStore <ChatDataStore>();
            chatDataStore.RegisterSubscriber(this);

            tmpMsgReq = new CSSendChatMessageReq();
            view.InitViewPos();
            InitView();

            view.switchBtn.onClick.AddListener(OnClickSwitch);
            view.sendBtn.onClick.AddListener(OnClickSend);
            view.emojiBtn.onClick.AddListener(OnClickEmoji);
            view.emojiBgBtn.onClick.AddListener(OnClickEmojiBg);

            GlobalEventSystem.Instance.Bind(EventId.onClickChatEmojiItem, OnClickEmojiItem);
            GlobalEventSystem.Instance.Bind(EventId.onClickKeyboardEnter, OnClickKeyboardEnter);
        }