public void ShowReceivedTeamMessage(BattleChatSystemMessageReceivedEvent e, ChatNode chatNode, [JoinByScreen] BattleChatGUINode battleChatGUINode, [JoinByScreen] ChatContentGUINode chatContentGUINode)
        {
            ChatUIComponent        chatUI    = battleChatGUINode.chatUI;
            GameObject             obj2      = Object.Instantiate <GameObject>(chatContentGUINode.chatContentGUI.MessagePrefab);
            Entity                 entity    = obj2.GetComponent <EntityBehaviour>().Entity;
            ChatMessageUIComponent component = obj2.GetComponent <ChatMessageUIComponent>();

            component.FirstPartText       = string.Empty;
            component.SecondPartText      = e.Message;
            component.SecondPartTextColor = chatUI.SystemMessageColor;
            RectTransform parent = chatContentGUINode.chatContentGUI.gameObject.GetComponent <RectTransform>();

            obj2.transform.SetParent(parent, false);
            parent.offsetMin = Vector2.zero;
            base.ScheduleEvent <ResizeBattleChatScrollViewEvent>(entity);
            chatUI.SendMessage("RefreshCurve", SendMessageOptions.DontRequireReceiver);
        }
        private void CreateMessage(ChatContentGUINode chatContentGUINode, BattleChatGUINode battleChatGUINode, Entity user, string message, bool isTeamMessage, TeamColor teamColor)
        {
            Color           blueTeamNicknameColor;
            Color           commonTextColor;
            ChatUIComponent chatUI = battleChatGUINode.chatUI;
            GameObject      obj2   = Object.Instantiate <GameObject>(chatContentGUINode.chatContentGUI.MessagePrefab);
            Entity          entity = obj2.GetComponent <EntityBehaviour>().Entity;

            if (teamColor == TeamColor.BLUE)
            {
                blueTeamNicknameColor = chatUI.BlueTeamNicknameColor;
                commonTextColor       = !isTeamMessage ? chatUI.CommonTextColor : chatUI.BlueTeamTextColor;
            }
            else if (teamColor != TeamColor.RED)
            {
                blueTeamNicknameColor = chatUI.CommonNicknameColor;
                commonTextColor       = chatUI.CommonTextColor;
            }
            else
            {
                blueTeamNicknameColor = chatUI.RedTeamNicknameColor;
                commonTextColor       = !isTeamMessage ? chatUI.CommonTextColor : chatUI.RedTeamTextColor;
            }
            ChatMessageUIComponent component = obj2.GetComponent <ChatMessageUIComponent>();

            component.FirstPartText       = user.GetComponent <UserUidComponent>().Uid + ": ";
            component.FirstPartTextColor  = blueTeamNicknameColor;
            component.SecondPartText      = message;
            component.SecondPartTextColor = commonTextColor;
            entity.AddComponent(new UserGroupComponent(user));
            RectTransform parent = chatContentGUINode.chatContentGUI.gameObject.GetComponent <RectTransform>();

            obj2.transform.SetParent(parent, false);
            base.ScheduleEvent <ResizeBattleChatScrollViewEvent>(entity);
            chatUI.SendMessage("RefreshCurve", SendMessageOptions.DontRequireReceiver);
        }