private void OnPlayerDisconnected(uLink.NetworkPlayer netPlayer)
        {
            NetUser netuser = netPlayer.GetLocalData() as NetUser;

            data = GetCreatPlayerData(netuser.userID.ToString());
            var      seconds  = netuser.SecondsConnected();
            TimeSpan timeSpan = TimeSpan.FromSeconds(seconds);

            data.timePlayed = data.timePlayed + timeSpan;
            data.lastDate   = time.ToString();
            SaveData();
        }
Exemple #2
0
 public static int GetUserConnectionTime(NetUser player)
 {
     return player.SecondsConnected();
 }
Exemple #3
0
 public static int GetUserConnectionTime(NetUser player)
 {
     return(player.SecondsConnected());
 }