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();
        }
Beispiel #2
0
 public static int GetUserConnectionTime(NetUser player)
 {
     return player.SecondsConnected();
 }
Beispiel #3
0
 public static int GetUserConnectionTime(NetUser player)
 {
     return(player.SecondsConnected());
 }