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