private void OnClientReceiveMessage(DeathMessage message)
        {
            var playerName   = PlayerJoin.PlayerNames.TryGetValue(message.SenderId, out var n) ? n : message.PlayerName;
            var deathMessage = Necronomicon.GetPhrase(message.DeathType);

            DebugLog.All(string.Format(deathMessage, playerName));
        }
示例#2
0
 private void OnClientReceiveMessage(LeaveMessage message)
 {
     DebugLog.All(message.PlayerName, "left");
     PlayerJoin.PlayerNames.Remove(message.SenderId);
     foreach (var objectId in message.ObjectIds)
     {
         DestroyObject(objectId);
     }
 }
示例#3
0
 private void OnClientReceiveMessage(JoinMessage message)
 {
     PlayerNames[message.SenderId] = message.PlayerName;
     DebugLog.All(message.PlayerName, "joined!");
 }