/// <summary> /// Add one death by damagetype to counter /// </summary> /// <param name="damageType"></param> public void AddDeath(Smod2.API.DamageType damageType) { if (DeathCounter.ContainsKey(damageType)) { DeathCounter[damageType]++; } else { DeathCounter[damageType] = 1; } }
/// <summary> /// Returns amount of kills gotten during the round by damagetype. /// </summary> /// <returns>int</returns> public int GetCurrentKillsByDamageType(Smod2.API.DamageType damageType) { if (KillsThisRoundCounter.ContainsKey(damageType)) { return(KillsThisRoundCounter[damageType]); } else { return(0); } }
/// <summary> /// Returns amount of kills gotten by damagetype. /// </summary> /// <param name="damageType"></param> /// <returns></returns> public int GetKillByDamageType(Smod2.API.DamageType damageType) { if (KillCounter.ContainsKey(damageType)) { return(KillCounter[damageType]); } else { return(0); } }
/// <summary> /// Add one kill by damagetype to kill list /// </summary> /// <param name="damageType"></param> public void AddKill(Smod2.API.DamageType damageType) { if (KillCounter.ContainsKey(damageType)) { KillCounter[damageType]++; } else { KillCounter[damageType] = 1; } if (KillsThisRoundCounter.ContainsKey(damageType)) { KillsThisRoundCounter[damageType]++; } else { KillsThisRoundCounter[damageType] = 1; } }
/// <summary> /// Force sets amount of deaths by damagetype /// </summary> /// <param name="damageType"></param> /// <param name="deaths"></param> public void SetDeath(Smod2.API.DamageType damageType, int deaths) { DeathCounter[damageType] = deaths; }
/// <summary> /// Force sets amount of kills by damagetype /// </summary> /// <param name="damageType">damagetype</param> /// <param name="kills">Amount of kills</param> public void SetKill(Smod2.API.DamageType damageType, int kills) { KillCounter[damageType] = kills; }