private void ResetTexts() { PlayerText.text = Username; KillsText.text = Kills.ToString(); DeathsText.text = Deaths.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 AddKill() { Kills++; Score += 3; KillsText.text = Kills.ToString(); ScoreText.text = Score.ToString(); }
void ActiveAKill() { if (KillsToBeAdded.Count != 0) { bool test = true; foreach (Kill aKill in Kills) { if (!aKill.MoveFinished) { test = false; break; } } if (test) { //Move down everything foreach (Kill aKill in Kills) { aKill.MoveDown(); } Kill kill = KillsToBeAdded[0]; Panel.AddChild(kill); Kills.Add(kill); KillsToBeAdded.Remove(kill); kill.Active(); } } }
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); }
/// <summary> /// Used to set previous values for every <see cref="AbstractVariable{T}"/>. Must use the same order and logic as the <see cref="Scan"/> method. /// </summary> public void PreScan() { PlayerID.PreScan(); Username.PreScan(); IsReplay.PreScan(); if (IsReplay.Value) { return; } IsAlive.PreScan(); Time.PreScan(); Kills.PreScan(); Gems.PreScan(); ShotsFired.PreScan(); ShotsHit.PreScan(); if (IsAlive.Value) { EnemiesAlive.PreScan(); } if (!IsAlive.Value) { DeathType.PreScan(); } }
private static KeyValuePair <DateTime, List <ZkbResponse.ZkbKill> > GetZKBResponse(long corpId, DateTime startTime, ZKBType type) { ZkbResponse Kills; ZKillboard kb = new ZKillboard(); ZKillboardOptions Options = new ZKillboardOptions(); List <ZkbResponse.ZkbKill> OrderedKills; Options.CorporationId.Add(corpId); if (startTime > DateTime.MinValue) { Options.StartTime = startTime; } if (Properties.Settings.Default.Debug) { SendPM(string.Format("Using StartTime {0}.", startTime.ToString("yyyy-MM-dd HH:mm:ss"))); } if (type == ZKBType.Kill) { Kills = kb.GetKills(Options); } else { Kills = kb.GetLosses(Options); } OrderedKills = Kills.OrderBy(Kill => Kill.KillTime).ToList(); return(new KeyValuePair <DateTime, List <ZkbResponse.ZkbKill> >(OrderedKills.Last().KillTime, OrderedKills)); }
void Start() { HighScoreText.SetActive(false); scoreText.text = "0"; Kills.SetActive(false); MyEventManager.Instance.DeactivatePooledObjects.Dispatch(); LeanTween.value(0f, ScoreManager.Instance.GetScore(), .5f).setOnUpdate(OnUpdate).setOnComplete(OnComplete); }
public int GetKills(string cause) { if (!Kills.ContainsKey(cause)) { return(0); } return(Kills[cause]); }
private void OnKillsCollectionChanged(object sender, NotifyCollectionChangedEventArgs e) { TeamKillCount = Kills.Count(k => k.KilledSide == k.KillerSide); KillCount = Kills.Count(k => k.KilledSide != k.KillerSide) - TeamKillCount - SuicideCount; HeadshotCount = Kills.Count(k => k.KilledSide != k.KillerSide && k.IsHeadshot); CrouchKillCount = Kills.Count(k => k.KilledSide != k.KillerSide && k.IsKillerCrouching); JumpKillCount = Kills.Count(k => k.KilledSide != k.KillerSide && k.KillerVelocityZ > 0); }
public void SetKillMeans() { var group = Kills.GroupBy(kills => kills.MeansOfDeath); foreach (var kills in group) { KillsMeans.Add(new KillMeans(kills.Key, kills.Count())); } }
//public Artifact(NameValueCollection data, World world) // : base (data, world) //{ // Name = data["Name"].ToString(); //} public override void Select(MainForm frm) { frm.grpArtifact.Text = ToString(); frm.grpArtifact.Show(); frm.lblArtifactName.Text = Name; frm.lblArtifactItem.Text = Item; frm.grpArtifactCreated.Visible = CreatedEvent != null; if (CreatedEvent != null) { frm.lblArtifactCreatedBy.Data = CreatedEvent.HistFigure; frm.lblArtifactCreatedSite.Data = CreatedEvent.Site; frm.lblArtifactCreatedTime.Data = CreatedEvent; frm.lblArtifactCreatedTime.Text = CreatedEvent.Time.ToString(); } frm.grpArtifactLost.Visible = LostEvent != null; if (LostEvent != null) { frm.lblArtifactLostSite.Data = LostEvent.Site; frm.lblArtifactLostTime.Data = LostEvent; frm.lblArtifactLostTime.Text = LostEvent.Time.ToString(); } frm.grpArtifactStored.Visible = StoredEvents != null; if (StoredEvents != null) { frm.lstArtifactStored.Items.Clear(); foreach (var evt in StoredEvents) { frm.lstArtifactStored.Items.Add(evt); } frm.lstArtifactStored.SelectedIndex = 0; } frm.grpArtifactPossessed.Visible = PossessedEvents != null; if (PossessedEvents != null) { frm.lstArtifactPossessed.Items.Clear(); foreach (var evt in PossessedEvents) { frm.lstArtifactPossessed.Items.Add(evt); } frm.lstArtifactPossessed.SelectedIndex = 0; } frm.lstArtifactKills.Items.Clear(); if (Kills != null) { frm.lstArtifactKills.Items.AddRange(Kills.ToArray()); } frm.grpArtifactKills.Visible = frm.lstArtifactKills.Items.Count > 0; Program.MakeSelected(frm.tabArtifact, frm.lstArtifact, this); }
private void AddToScore() { Kills.SetActive(false); Debug.Log(ScoreManager.Instance.GetKills() * ScoreManager.Instance.GetScorePerKill()); int score = ScoreManager.Instance.GetScore() + (ScoreManager.Instance.GetKills() * ScoreManager.Instance.GetScorePerKill()); LeanTween.value(ScoreManager.Instance.GetScore(), score, .5f).setOnUpdate(OnUpdate); CheckHighScore(score); }
public void AddAll(Statistics statistics) { Demos.AddRange(statistics.Demos); Kills.AddRange(statistics.Kills); Rounds.AddRange(statistics.Rounds); foreach (var(key, value) in statistics.Movement) { Movement[key] = value; } }
public Match() { kills = new MTObservableCollection <Kill>(); CTWins = 0; TWins = 0; Kills.Clear(); HeadshotPercent = 0.0f; TotalDeaths = 0; datePlayed = DateTime.Now; Kills.CollectionChanged += Kills_CollectionChanged; }
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 override int GetHashCode() { unchecked { var hashCode = Score.GetHashCode(); hashCode = hashCode * 397 ^ Wins.GetHashCode(); hashCode = hashCode * 397 ^ Kills.GetHashCode(); hashCode = hashCode * 397 ^ Matches.GetHashCode(); hashCode = hashCode * 397 ^ LastModified.GetHashCode(); return(hashCode); } }
public override void Kill(int timeLeft) { foreach (Action <ProceduralSpellProj> action in Kills.Where(action => action != null)) { action(this); } if (timeLeft > 0) { //Main.PlaySound(SoundID.Dig, projectile.position); SoundManager.PlaySound(Sounds.Dig, projectile.position); } }
public void ResetStats() { AssistCount = 0; BombDefusedCount = 0; BombExplodedCount = 0; BombPlantedCount = 0; CrouchKillCount = 0; DecoyThrownCount = 0; DeathCount = 0; EseaRws = 0; EseaRwsPointCount = 0; FiveKillCount = 0; FlashbangThrownCount = 0; FlashDurationTemp = 0; FourKillCount = 0; HasBomb = false; HasEntryHoldKill = false; HasEntryKill = false; HeadshotCount = 0; HeGrenadeThrownCount = 0; IncendiaryThrownCount = 0; IsAlive = true; IsConnected = true; IsControllingBot = false; JumpKillCount = 0; KillCount = 0; MolotovThrownCount = 0; OneKillCount = 0; RatingHltv = 0; RatingHltv2 = 0; RoundMvpCount = 0; RoundPlayedCount = 0; Score = 0; SmokeThrownCount = 0; TeamKillCount = 0; ThreeKillCount = 0; TradeDeathCount = 0; TradeKillCount = 0; TwoKillCount = 0; Assists.Clear(); Clutches.Clear(); Deaths.Clear(); EntryHoldKills.Clear(); EntryKills.Clear(); EquipementValueRounds.Clear(); Kills.Clear(); PlayersHurted.Clear(); RoundsMoneyEarned.Clear(); StartMoneyRounds.Clear(); TimeDeathRounds.Clear(); }
private void OnKillsCollectionChanged(object sender, NotifyCollectionChangedEventArgs e) { KillCount = Kills.Count; DeathCount = Kills.Count; TradeKillCount = Kills.Count(k => k.IsTradeKill); HeadshotCount = Kills.Count(k => k.IsHeadshot); EntryKillCount = Players.Sum(p => p.EntryKills.Count); CrouchKillCount = Players.Sum(p => p.CrouchKillCount); AssistCount = Kills.Count(k => k.AssisterSteamId != 0); JumpKillCount = Kills.Count(killEvent => killEvent.KillerVelocityZ > 0); KnifeKillCount = Kills.Count(killEvent => killEvent.Weapon.Element == EquipmentElement.Knife); TeamKillCount = Players.Sum(p => p.TeamKillCount); }
private void OnComplete() { if (ScoreManager.Instance.GetKills() > 0) { Kills.SetActive(true); Kills.text = "+" + ScoreManager.Instance.GetKills() + " Kills"; LeanTween.moveY(Kills.rectTransform, 300f, 1f).setOnComplete(AddToScore); } else { CheckHighScore(ScoreManager.Instance.GetScore()); } }
public void RefreshMinLevelBindings() { Attack.RefreshPropertyBinding(nameof(Attack.MinValue)); CriticalDamage.RefreshPropertyBinding(nameof(CriticalDamage.MinValue)); CriticalChance.RefreshPropertyBinding(nameof(CriticalChance.MinValue)); AttackSpeed.RefreshPropertyBinding(nameof(AttackSpeed.MinValue)); Health.RefreshPropertyBinding(nameof(Health.MinValue)); Shields.RefreshPropertyBinding(nameof(Shields.MinValue)); DefensiveEssence.RefreshPropertyBinding(nameof(DefensiveEssence.MinValue)); DamageReduction.RefreshPropertyBinding(nameof(DamageReduction.MinValue)); Mining.RefreshPropertyBinding(nameof(Mining.MinValue)); Kills.RefreshPropertyBinding(nameof(Kills.MinValue)); Veterancy.RefreshPropertyBinding(nameof(Veterancy.MinValue)); Acceleration.RefreshPropertyBinding(nameof(Acceleration.MinValue)); }
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 void Reset(int tick) { AverageHealthDamagePerPlayer = 0; BombDefused = null; BombDefusedCount = 0; BombExploded = null; BombExplodedCount = 0; BombPlanted = null; BombPlantedCount = 0; CrouchKillCount = 0; DamageArmorCount = 0; DamageHealthCount = 0; DecoyThrownCount = 0; EntryHoldKillEvent = null; EntryKillEvent = null; EquipementValueTeamCt = 0; EquipementValueTeamT = 0; FiveKillCount = 0; FourKillCount = 0; IncendiaryThrownCount = 0; JumpKillCount = 0; KillCount = 0; MolotovThrownCount = 0; OneKillCount = 0; SideTrouble = Side.None; SmokeThrownCount = 0; TeamTroubleName = string.Empty; ThreeKillCount = 0; TradeKillCount = 0; Tick = tick; Type = RoundType.NORMAL; TwoKillCount = 0; WinnerName = string.Empty; WinnerSide = Side.None; ExplosiveGrenadesExploded.Clear(); FlashbangsExploded.Clear(); Kills.Clear(); PlayersHurted.Clear(); SmokeStarted.Clear(); WeaponFired.Clear(); }
private void OnKillsCollectionChanged(object sender, NotifyCollectionChangedEventArgs e) { KillCount = Kills.Count; JumpKillCount = Kills.Count(killEvent => killEvent.KillerVelocityZ > 0); CrouchKillCount = Kills.Count(killEvent => killEvent.IsKillerCrouching); TradeKillCount = Kills.Count(k => k.IsTradeKill); var kills = Kills.Where(k => k.KillerSide != k.KilledSide && k.KillerSteamId != 0) .GroupBy(k => k.KillerSteamId) .Select(group => new { SteamId = group.Key, KillCount = group.Count() }).ToList(); OneKillCount = kills.Count(k => k.KillCount == 1); TwoKillCount = kills.Count(k => k.KillCount == 2); ThreeKillCount = kills.Count(k => k.KillCount == 3); FourKillCount = kills.Count(k => k.KillCount == 4); FiveKillCount = kills.Count(k => k.KillCount == 5); }
public void ResetStats() { KillCount = 0; DeathCount = 0; AssistCount = 0; HeadshotCount = 0; TeamKillCount = 0; RoundMvpCount = 0; OneKillCount = 0; TwoKillCount = 0; ThreeKillCount = 0; FourKillCount = 0; FiveKillCount = 0; BombDefusedCount = 0; BombPlantedCount = 0; Score = 0; RatingHltv = 0; RoundPlayedCount = 0; FlashDurationTemp = 0; CrouchKillCount = 0; JumpKillCount = 0; TradeKillCount = 0; TradeDeathCount = 0; EseaRws = 0; EseaRwsPointCount = 0; HasEntryKill = false; HasEntryHoldKill = false; Kills.Clear(); Deaths.Clear(); Assists.Clear(); EntryKills.Clear(); EntryHoldKills.Clear(); PlayersHurted.Clear(); Clutches.Clear(); StartMoneyRounds.Clear(); EquipementValueRounds.Clear(); RoundsMoneyEarned.Clear(); }
public void SetValues() { Title.GetComponent <TextMeshProUGUI>().text = ProfileManager.GetComponent <ProfileMgr>()._Username; Kills.GetComponent <TextMeshProUGUI>().text = "Kills: " + ProfileManager.GetComponent <ProfileMgr>()._kills.ToString(); Deaths.GetComponent <TextMeshProUGUI>().text = "Deaths: " + ProfileManager.GetComponent <ProfileMgr>()._deaths.ToString(); Matches.GetComponent <TextMeshProUGUI>().text = "Matches: " + ProfileManager.GetComponent <ProfileMgr>()._matches.ToString(); Ratio.GetComponent <TextMeshProUGUI>().text = "Kill/Death Ratio: " + ProfileManager.GetComponent <ProfileMgr>()._kdleft.ToString() + " / " + ProfileManager.GetComponent <ProfileMgr>()._kdright.ToString(); PrestigeText.GetComponent <TextMeshProUGUI>().text = "Prestige Level " + ProfileManager.GetComponent <ProfileMgr>()._level.ToString(); PrestigeExpBar.GetComponent <Transform>().localScale = new Vector3(ProfileManager.GetComponent <ProfileMgr>()._exp, 1, 1); }
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()); }
/// <summary> /// Restore player's data from a Player object /// </summary> /// <param name="player"></param> public void BackupFromPlayer(Player player) { Kills.Clear(); foreach (KillEvent e in player.Kills) { Kills.Add(e); } Deaths.Clear(); foreach (KillEvent e in player.Deaths) { Deaths.Add(e); } Assists.Clear(); foreach (KillEvent e in player.Assists) { Assists.Add(e); } Clutches.Clear(); foreach (ClutchEvent e in player.Clutches) { Clutches.Add(e); } EntryHoldKills.Clear(); foreach (EntryHoldKillEvent e in player.EntryHoldKills) { EntryHoldKills.Add(e); } EntryKills.Clear(); foreach (EntryKillEvent e in player.EntryKills) { EntryKills.Add(e); } PlayersHurted.Clear(); foreach (PlayerHurtedEvent e in player.PlayersHurted) { PlayersHurted.Add(e); } RoundsMoneyEarned.Clear(); foreach (KeyValuePair <int, int> kvp in player.RoundsMoneyEarned) { RoundsMoneyEarned.Add(kvp.Key, kvp.Value); } StartMoneyRounds.Clear(); foreach (KeyValuePair <int, int> kvp in player.StartMoneyRounds) { StartMoneyRounds.Add(kvp.Key, kvp.Value); } EquipementValueRounds.Clear(); foreach (KeyValuePair <int, int> kvp in player.EquipementValueRounds) { EquipementValueRounds.Add(kvp.Key, kvp.Value); } AssistCount = player.AssistCount; BombDefusedCount = player.BombDefusedCount; BombExplodedCount = player.BombExplodedCount; BombPlantedCount = player.BombPlantedCount; CrouchKillCount = player.CrouchKillCount; DeathCount = player.DeathCount; DecoyThrownCount = player.DecoyThrownCount; EseaRws = player.EseaRws; EseaRwsPointCount = player.EseaRwsPointCount; FiveKillCount = player.FiveKillCount; FlashbangThrownCount = player.FlashbangThrownCount; FlashDurationTemp = player.FlashDurationTemp; FourKillCount = player.FourKillCount; HasBomb = player.HasBomb; HasEntryHoldKill = player.HasEntryHoldKill; HasEntryKill = player.HasEntryKill; HeadshotCount = player.HeadshotCount; HeGrenadeThrownCount = player.HeGrenadeThrownCount; IsAlive = player.IsAlive; IncendiaryThrownCount = player.IncendiaryThrownCount; IsConnected = player.IsConnected; IsControllingBot = player.IsControllingBot; JumpKillCount = player.JumpKillCount; KillCount = player.KillCount; MolotovThrownCount = player.MolotovThrownCount; OneKillCount = player.OneKillCount; RatingHltv = player.RatingHltv; RoundMvpCount = player.RoundMvpCount; RoundPlayedCount = player.RoundPlayedCount; Score = player.Score; Side = player.Side; SmokeThrownCount = player.SmokeThrownCount; TeamKillCount = player.TeamKillCount; TeamName = player.TeamName; ThreeKillCount = player.ThreeKillCount; TradeDeathCount = player.TradeDeathCount; TradeKillCount = player.TradeKillCount; TwoKillCount = player.TwoKillCount; }
public override void ReceiveExtraAI(BinaryReader reader) { projectile.owner = reader.ReadInt32(); int starType = reader.ReadInt32(); int crossType = reader.ReadInt32(); int moonType = reader.ReadInt32(); projectile.damage = reader.ReadInt32(); bool minionCaster = reader.ReadBoolean(); Caster = minionCaster ? Main.projectile[reader.ReadInt32()] : (Entity)Main.player[reader.ReadInt32()]; List <GlyphModifier> modifiers = new List <GlyphModifier>(); int count = reader.ReadInt32(); for (int i = 0; i < count; i += 1) { modifiers.Add(GlyphModifier.Modifiers[reader.ReadInt32()]); } if (Source == null) { Source = new ProceduralSpell(mod); Source.Glyphs[(byte)GlyphType.Star].SetDefaults(starType, true); Source.Glyphs[(byte)GlyphType.Cross].SetDefaults(crossType, true); Source.Glyphs[(byte)GlyphType.Moon].SetDefaults(moonType, true); Source.ModifierOverride = modifiers; } foreach (Item item in Source.Glyphs) { Glyph glyph = (Glyph)item.modItem; if (glyph.GetAiAction() != null) { Ai.Add(glyph.GetAiAction()); } if (glyph.GetInitAction() != null) { Inits.Add(glyph.GetInitAction()); } if (glyph.GetImpactAction() != null) { Impacts.Add(glyph.GetImpactAction()); } if (glyph.GetKillAction() != null) { Kills.Add(glyph.GetKillAction()); } } foreach (GlyphModifier modifier in modifiers) { if (modifier.Impact != null) { Impacts.Add(modifier.Impact); } if (modifier.Draw != null) { SpellDraw.Add(modifier.Draw); } if (modifier.Init != null) { Inits.Add(modifier.Init); } } Initialize(); }