Exemplo n.º 1
0
            public NetworkChatMessage(string senderGuid, string text, DateTime timeStamp, NetworkChatMessageType type)
            {
                this.senderGuid = senderGuid;
                NetworkPlayerData playerData = NetworkCenter.Instance.GetPlayerData(senderGuid);

                this.senderName = playerData == null ? string.Empty : playerData.playerName;
                this.text       = text;
                this.timeStamp  = timeStamp;
                this.type       = type;
            }
Exemplo n.º 2
0
            private void AddTextMessage(string text, string playerGuid, NetworkChatMessageType type)
            {
                NetworkChatMessage message = new NetworkChatMessage(playerGuid, text, DateTime.Now, type);

                chatHistory.Enqueue(message);
                if (onMessageReceivedDelegate != null)
                {
                    onMessageReceivedDelegate(message);
                }
            }