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