private void ResetTexts() { PlayerText.text = Username; KillsText.text = Kills.ToString(); DeathsText.text = Deaths.ToString(); ScoreText.text = Score.ToString(); }
public Dictionary <string, string> DataToDict() { Dictionary <string, string> result = new Dictionary <string, string> { ["experience"] = Experience.ToString(), ["kills"] = Kills.ToString(), ["leaks"] = Leaks.ToString(), ["builds"] = Builds.ToString(), ["sends"] = Sends.ToString(), ["earned_tangos"] = EarnedTangos.ToString(), ["won_games"] = WonGames.ToString(), ["won_duels"] = WonDuels.ToString(), ["lost_games"] = LostGames.ToString(), ["lost_duels"] = LostDuels.ToString(), ["win_rate"] = WinRate.ToString(), ["duel_win_rate"] = DuelWinRate.ToString(), ["rating"] = Rating.ToString(), ["earned_gold"] = EarnedGold.ToString(), ["gold_per_minute"] = GoldPerMinute.ToString(), ["tangos_per_minute"] = TangosPerMinute.ToString(), ["time_played"] = TimePlayed.ToString() }; // foreach (var data in FractionDatas) { // result[KilledPrefix + data.FractionName] = data.Killed.ToString(); // result[PlayedPrefix + data.FractionName] = data.Played.ToString(); // } foreach (var pair in PlayedFractions) { result[pair.Key] = pair.Value.ToString(); } // foreach (var pair in FractionKills) // result[pair.Key] = pair.Value.ToString(); return(result); }
public void AddKill() { Kills++; Score += 3; KillsText.text = Kills.ToString(); ScoreText.text = Score.ToString(); }
public string GetField(int field) { switch (field) { case 0: return(Name); case 1: return(Score.ToString()); case 2: return(Ping.ToString()); case 3: return(Team.ToString()); case 4: return(Deaths.ToString()); case 5: return(Pid.ToString()); case 6: return(Kills.ToString()); case 7: return((IsBot ? 1 : 0).ToString()); default: return(""); } }
public void UpdateStats() { var canvas = transform.Find("Canvas"); canvas.Find("Health").GetComponent <Text>().text = Mathf.Max(Mathf.Round(health), 0).ToString(); canvas.Find("Kills").GetComponent <Text>().text = Kills.ToString(); canvas.Find("Nitro").GetComponent <Text>().text = Math.Round(nitro, 1).ToString(); canvas.Find("Damage").GetComponent <Text>().text = Math.Round(damage, 0).ToString(); canvas.Find("Armor").GetComponent <Text>().text = Math.Round(armor, 0).ToString(); UpdateSpecialStats(); }
public void GotAKill() { if (!photonView.isMine) { return; } Kills++; KillText.text = Kills.ToString(); if (myCurrGun < 2) { myCurrGun++; photonView.RPC("GunUpgrade", PhotonTargets.All, myCurrGun); } if (Kills >= 15) { photonView.RPC("endGame", PhotonTargets.All); } }
public override string ToString() { var sb = new StringBuilder(); sb.AppendLine($"Player Name: {PlayerName}"); sb.AppendLine($"Mods Enabled: {ModsEnabled.ToString()}"); sb.AppendLine($"Kills: {Kills.ToString()}"); sb.AppendLine($"Exp: {Exp.ToString()}"); sb.AppendLine($"Item IDs: {ItemIDs.Count}"); foreach (var VARIABLE in ItemIDs) { sb.AppendLine($"\t{VARIABLE}"); } sb.AppendLine($"Highest Seasonal Levels: {HighestSeasonalLevels.Length}"); foreach (var VARIABLE in HighestSeasonalLevels) { sb.AppendLine($"\t{VARIABLE}"); } return(sb.ToString()); }
public void Save(string Key) { bool found = false; string OutputFile = "./Database/Users/" + Name + "/Info.Dat"; Utilities.IO.PrepareDirectory("./Database/"); Utilities.IO.PrepareDirectory("./Database/Users/"); Utilities.IO.PrepareDirectory("./Database/Users/" + Name); Utilities.IO.PrepareFile(OutputFile); string[] OutputFileContents = Utilities.IO.ReadAllLines(OutputFile); string OutTime = Utilities.DateTimeUtilities.ToYearTimeDescending(Utilities.DateTimeUtilities.FormatDateTime(DateTime.Now)); List <String> Output = new List <String>(); foreach (string line in OutputFileContents) { #region GetDataCouplets string ThisLine = line; if (!(ThisLine.Contains("\t"))) { Output.Add(line); continue; } while (ThisLine.Contains("\t\t")) { ThisLine = ThisLine.Replace("\t\t", "\t"); } string Header = ThisLine.Split('\t')[0]; string Data = ThisLine.Remove(0, ((Header.Length) + 1)); var Converted = Utilities.IO.StringToVariable(Data); //NOTE: These WILL Bypass GUI mode if enabled, as the GUI setting is turned on until it is read. //if (Converted is Boolean) Logger.Console.WriteLine(String.Format("Bool: {0}", Data)); //if (Converted is IPAddress) Logger.Console.WriteLine(String.Format("IPAddress: {0}", Data)); //if (Converted is Decimal) Logger.Console.WriteLine(String.Format("Decimal: {0}", Data)); //if (Converted is Int32) Logger.Console.WriteLine(String.Format("Int32: {0}", Data)); //if (Converted is String) Logger.Console.WriteLine(String.Format("String: {0}", Data)); #endregion if (Key.ToUpperInvariant() != Header.ToUpperInvariant()) { Output.Add(line); continue; } switch (Header.ToUpperInvariant()) { #region Switches case Strings.Name: Output.Add(Strings.Name + "\t\t" + Name); found = true; break; case Strings.DisplayedName: Output.Add(Strings.DisplayedName + "\t\t" + DisplayedName.ToString()); found = true; break; case Strings.LastIP: Output.Add(Strings.LastIP + "\t\t\t" + LastIP.ToString()); found = true; break; case Strings.LoginCount: Output.Add(Strings.LoginCount + "\t\t" + LoginCount.ToString()); found = true; break; case Strings.MessagesTyped: Output.Add(Strings.MessagesTyped + "\t\t" + MessagesTyped.ToString()); found = true; break; case Strings.DateJoined: Output.Add(Strings.DateJoined + "\t\t" + DateJoined.ToString()); found = true; break; case Strings.DateLastVisited: Output.Add(Strings.DateLastVisited + "\t\t" + DateLastVisited.ToString()); found = true; break; case Strings.PlayTime: Output.Add(Strings.PlayTime + "\t\t" + PlayTime.ToString()); found = true; break; case Strings.Kills: Output.Add(Strings.Kills + "\t\t\t" + Kills.ToString()); found = true; break; case Strings.Deaths: Output.Add(Strings.Deaths + "\t\t\t" + Deaths.ToString()); found = true; break; case Strings.FlightsFlown: Output.Add(Strings.FlightsFlown + "\t\t" + FlightsFlown.ToString()); found = true; break; case Strings.FlightHours: Output.Add(Strings.FlightHours + "\t\t" + FlightHours.ToString()); found = true; break; case Strings.Banned: Output.Add(Strings.Banned + "\t\t\t" + Banned.ToString()); found = true; break; case Strings.BannedBy: Output.Add(Strings.BannedBy + "\t\t" + BannedBy.ToString()); found = true; break; case Strings.DateBanned: Output.Add(Strings.DateBanned + "\t\t" + DateBanned.ToString()); found = true; break; case Strings.BanExpires: Output.Add(Strings.BanExpires + "\t\t" + BanExpires.ToString()); found = true; break; case Strings.BanReason: Output.Add(Strings.BanReason + "\t\t" + BanReason.ToString()); found = true; break; case Strings.TimesBanned: Output.Add(Strings.TimesBanned + "\t\t" + TimesBanned.ToString()); found = true; break; case Strings.Frozen: Output.Add(Strings.Frozen + "\t\t\t" + Frozen.ToString()); found = true; break; case Strings.FrozenBy: Output.Add(Strings.FrozenBy + "\t\t" + FrozenBy.ToString()); found = true; break; case Strings.DateFrozen: Output.Add(Strings.DateFrozen + "\t\t" + DateFrozen.ToString()); found = true; break; case Strings.FreezeExpires: Output.Add(Strings.FreezeExpires + "\t\t" + FreezeExpires.ToString()); found = true; break; case Strings.FreezeReason: Output.Add(Strings.FreezeReason + "\t\t" + FreezeReason.ToString()); found = true; break; case Strings.TimesFrozen: Output.Add(Strings.TimesFrozen + "\t\t" + TimesFrozen.ToString()); found = true; break; case Strings.Muted: Output.Add(Strings.Muted + "\t\t\t" + Muted.ToString()); found = true; break; case Strings.MutedBy: Output.Add(Strings.MutedBy + "\t\t\t" + MutedBy.ToString()); found = true; break; case Strings.DateMuted: Output.Add(Strings.DateMuted + "\t\t" + DateMuted.ToString()); found = true; break; case Strings.MuteExpires: Output.Add(Strings.MuteExpires + "\t\t" + MuteExpires.ToString()); found = true; break; case Strings.MuteReason: Output.Add(Strings.MuteReason + "\t\t" + MuteReason.ToString()); found = true; break; case Strings.TimesMuted: Output.Add(Strings.TimesMuted + "\t\t" + TimesMuted.ToString()); found = true; break; case Strings.Kicked: Output.Add(Strings.Kicked + "\t\t\t" + Kicked.ToString()); found = true; break; case Strings.KickedBy: Output.Add(Strings.KickedBy + "\t\t" + KickedBy.ToString()); found = true; break; case Strings.DateKicked: Output.Add(Strings.DateKicked + "\t\t" + DateKicked.ToString()); found = true; break; case Strings.KickReason: Output.Add(Strings.KickReason + "\t\t" + KickReason.ToString()); found = true; break; case Strings.TimesKicked: Output.Add(Strings.TimesKicked + "\t\t" + TimesKicked.ToString()); found = true; break; case Strings.OthersBanned: Output.Add(Strings.OthersBanned + "\t\t" + OthersBanned.ToString()); found = true; break; case Strings.OthersFrozen: Output.Add(Strings.OthersFrozen + "\t\t" + OthersFrozen.ToString()); found = true; break; case Strings.OthersMuted: Output.Add(Strings.OthersMuted + "\t\t" + OthersMuted.ToString()); found = true; break; case Strings.OthersKicked: Output.Add(Strings.OthersKicked + "\t\t" + OthersKicked.ToString()); found = true; break; case Strings.GroupRepresented: Output.Add(Strings.GroupRepresented + "\t" + GroupRepresented.ToString()); found = true; break; #endregion default: Logger.Log.SystemMessage(String.Format("Unrecognised Value: {0}", Header)); //Unrecognised Value. break; } } if (!found) { switch (Key) { #region Switches case Strings.Name: Output.Add(Strings.Name + "\t\t" + Name); found = true; break; case Strings.DisplayedName: Output.Add(Strings.DisplayedName + "\t\t" + DisplayedName.ToString()); found = true; break; case Strings.LastIP: Output.Add(Strings.LastIP + "\t\t\t" + LastIP.ToString()); found = true; break; case Strings.LoginCount: Output.Add(Strings.LoginCount + "\t\t" + LoginCount.ToString()); found = true; break; case Strings.MessagesTyped: Output.Add(Strings.MessagesTyped + "\t\t" + MessagesTyped.ToString()); found = true; break; case Strings.DateJoined: Output.Add(Strings.DateJoined + "\t\t" + DateJoined.ToString()); found = true; break; case Strings.DateLastVisited: Output.Add(Strings.DateLastVisited + "\t\t" + DateLastVisited.ToString()); found = true; break; case Strings.PlayTime: Output.Add(Strings.PlayTime + "\t\t" + PlayTime.ToString()); found = true; break; case Strings.Kills: Output.Add(Strings.Kills + "\t\t\t" + Kills.ToString()); found = true; break; case Strings.Deaths: Output.Add(Strings.Deaths + "\t\t\t" + Deaths.ToString()); found = true; break; case Strings.FlightsFlown: Output.Add(Strings.FlightsFlown + "\t\t" + FlightsFlown.ToString()); found = true; break; case Strings.FlightHours: Output.Add(Strings.FlightHours + "\t\t" + FlightHours.ToString()); found = true; break; case Strings.Banned: Output.Add(Strings.Banned + "\t\t\t" + Banned.ToString()); found = true; break; case Strings.BannedBy: Output.Add(Strings.BannedBy + "\t\t" + BannedBy.ToString()); found = true; break; case Strings.DateBanned: Output.Add(Strings.DateBanned + "\t\t" + DateBanned.ToString()); found = true; break; case Strings.BanExpires: Output.Add(Strings.BanExpires + "\t\t" + BanExpires.ToString()); found = true; break; case Strings.BanReason: Output.Add(Strings.BanReason + "\t\t" + BanReason.ToString()); found = true; break; case Strings.TimesBanned: Output.Add(Strings.TimesBanned + "\t\t" + TimesBanned.ToString()); found = true; break; case Strings.Frozen: Output.Add(Strings.Frozen + "\t\t\t" + Frozen.ToString()); found = true; break; case Strings.FrozenBy: Output.Add(Strings.FrozenBy + "\t\t" + FrozenBy.ToString()); found = true; break; case Strings.DateFrozen: Output.Add(Strings.DateFrozen + "\t\t" + DateFrozen.ToString()); found = true; break; case Strings.FreezeExpires: Output.Add(Strings.FreezeExpires + "\t\t" + FreezeExpires.ToString()); found = true; break; case Strings.FreezeReason: Output.Add(Strings.FreezeReason + "\t\t" + FreezeReason.ToString()); found = true; break; case Strings.TimesFrozen: Output.Add(Strings.TimesFrozen + "\t\t" + TimesFrozen.ToString()); found = true; break; case Strings.Muted: Output.Add(Strings.Muted + "\t\t\t" + Muted.ToString()); found = true; break; case Strings.MutedBy: Output.Add(Strings.MutedBy + "\t\t\t" + MutedBy.ToString()); found = true; break; case Strings.DateMuted: Output.Add(Strings.DateMuted + "\t\t" + DateMuted.ToString()); found = true; break; case Strings.MuteExpires: Output.Add(Strings.MuteExpires + "\t\t" + MuteExpires.ToString()); found = true; break; case Strings.MuteReason: Output.Add(Strings.MuteReason + "\t\t" + MuteReason.ToString()); found = true; break; case Strings.TimesMuted: Output.Add(Strings.TimesMuted + "\t\t" + TimesMuted.ToString()); found = true; break; case Strings.Kicked: Output.Add(Strings.Kicked + "\t\t\t" + Kicked.ToString()); found = true; break; case Strings.KickedBy: Output.Add(Strings.KickedBy + "\t\t" + KickedBy.ToString()); found = true; break; case Strings.DateKicked: Output.Add(Strings.DateKicked + "\t\t" + DateKicked.ToString()); found = true; break; case Strings.KickReason: Output.Add(Strings.KickReason + "\t\t" + KickReason.ToString()); found = true; break; case Strings.TimesKicked: Output.Add(Strings.TimesKicked + "\t\t" + TimesKicked.ToString()); found = true; break; case Strings.OthersBanned: Output.Add(Strings.OthersBanned + "\t\t" + OthersBanned.ToString()); found = true; break; case Strings.OthersFrozen: Output.Add(Strings.OthersFrozen + "\t\t" + OthersFrozen.ToString()); found = true; break; case Strings.OthersMuted: Output.Add(Strings.OthersMuted + "\t\t" + OthersMuted.ToString()); found = true; break; case Strings.OthersKicked: Output.Add(Strings.OthersKicked + "\t\t" + OthersKicked.ToString()); found = true; break; case Strings.GroupRepresented: Output.Add(Strings.GroupRepresented + "\t" + GroupRepresented.ToString()); found = true; break; #endregion default: Logger.Log.SystemMessage(String.Format("Unrecognised Value: {0}", Key)); //Unrecognised Value. break; } } try { File.WriteAllLines(OutputFile, Output.ToList()); } catch { } }
private void UpdatePlayerKillsCounter() { PlayerKillsOtherVirus.Invoke(); Kills++; PlayerKillsText.text = "x " + Kills.ToString(); }