Exemplo n.º 1
0
    public void SetChatMode(bool isPublicMode)
    {
        chatManager.SetChatMode(isPublicMode);

        if (isPublicMode)
        {
            privateChat.SavePrivateMessages(privateChatUI.GetText());

            activeChatUI = publicChatUI;
            publicChatUI.SetMessageReceiver("Общий:");
        }
        else
        {
            privateChatTweener.Show();

            var userData = privateChat.MessageReceiver.Value;

            activeChatUI = privateChatUI;
            privateChatUI.Append(privateChat.GetMessages());
            privateChatUI.SetMessageReceiver($"To {userData.id} {userData.nick}: ");
        }

        activeChatUI.Activate();
    }
Exemplo n.º 2
0
 private void Start()
 {
     activeChatUI = publicChatUI;
     publicChatUI.Activate();
 }