Пример #1
0
    public void On(NewChatMessageClientToServer message)
    {
        if (!IsFromPlayersAtThisTable(message))
        {
            return;
        }

        ServerPlayer sender = message.originConnection == playerA?.connection ? playerA : playerB;

        SendAllAtTable(NotifyChatEntryMessage.MakeWithTimestamp($"{sender.nickname}: {message.message}"));
    }
    public void On(NotifyChatEntryMessage message)
    {
        Assert.IsTrue(isEntered);

        var text = message.message;

        switch (message.kind)
        {
        case NotifyChatEntryMessage.Kind.ServerMessage:
            text = FormatServerMessage(text);
            break;

        default:
            break;
        }

        uiPanel.AddChatLine(text);
    }
Пример #3
0
 private NotifyChatEntryMessage MakeServerChatMessage(string message)
 {
     return(NotifyChatEntryMessage.MakeWithTimestamp(message, NotifyChatEntryMessage.Kind.ServerMessage));
 }