Esempio n. 1
0
        private void AddSelfChat(ChatData newChat)
        {
            var chatItemView = _selfChatHistoryItemPool.Spawn();

            chatItemView.transform.SetAsLastSibling();
            chatItemView.Initialize(newChat);
        }
Esempio n. 2
0
        private void ResolveChat([NotNull] ChatData newChat)
        {
            if (newChat == null)
            {
                throw new ArgumentNullException(nameof(newChat));
            }

            switch (newChat.ChatType)
            {
            case ChatType.Self:
                AddSelfChat(newChat);
                break;

            case ChatType.Other:
                AddOtherChat(newChat);
                break;

            default:
                throw new ArgumentOutOfRangeException();
            }
        }
Esempio n. 3
0
 public void Initialize(ChatData data)
 {
     chatMessage.text      = data.Message;
     chatReceivedTime.text = data.ReceivedTime.ToShortTimeString();
 }