public static List <object> GetValuesForRow(object row) { Player player = row as Player; uint playingObjectId = 0; if (player.PlayerGameObject != null) { playingObjectId = player.PlayerGameObject.GetComponent <NetworkIdentity> ().netId.Value; } var values = new List <object> () { player.playerName, player.GetComponent <Score> ().NumKills, player.GetComponent <Score> ().NumDeaths, player.Ping }; if (NetworkStatus.IsServer()) { // add stuff for dedicated server values.AddRange(new object[] { player.health, player.netId.Value, playingObjectId, "", player.conn.address }); } return(values); }
public static List <string> GetColumnNames() { if (NetworkStatus.IsClient()) { return(new List <string>() { "name", "kills", "deaths", "ping" }); } else if (NetworkStatus.IsServer()) { return(new List <string>() { "name", "kills", "deaths", "ping", "health", "net id", "obj id", "status", "ip" }); } return(null); }
public static List <float> GetColumnWidthPercentages() { List <float> widthPercentages = null; if (NetworkStatus.IsClient()) { widthPercentages = new List <float>() { 0.4f, 0.15f, 0.15f, 0.3f } } ; else if (NetworkStatus.IsServer()) { widthPercentages = new List <float>() { 0.25f, 0.05f, 0.05f, 0.05f, 0.05f, 0.05f, 0.05f, 0.225f, 0.225f } } ; return(widthPercentages); }