コード例 #1
0
        private static void OnModdedplayerjoinReceived(string sender, string data)
        {
            ModdedUser mu = JsonConvert.DeserializeObject <ModdedUser>(data);

            lock (moddedUserList)
            {
                if (!moddedUserList.ContainsKey(mu.id))
                {
                    moddedUserList.Add(mu.id, mu);
                }
            }
        }
コード例 #2
0
        private static void OnModdedplayerjoinReceived(string sender, string data)
        {
            ModdedUser mu = JsonUtility.FromJson <ModdedUser>(data);

            lock (moddedUserList)
            {
                if (!moddedUserList.ContainsKey(mu.id))
                {
                    moddedUserList.Add(mu.id, mu);
                }
            }
        }
コード例 #3
0
 private static void OnModdedplayerlistonjoinReceived(string sender, string data)
 {
     ModdedUser[] muld = ModdedUser.ParseJson(data);
     lock (moddedUserList)
     {
         foreach (ModdedUser mu in muld)
         {
             if (!moddedUserList.ContainsKey(mu.id))
             {
                 moddedUserList.Add(mu.id, mu);
             }
         }
     }
 }