public Comparison(AllegObject shooter, float kb, float accuracy, float launchSpeed, AllegObject killed) { _accuracy = accuracy; _object1 = shooter; _object2 = killed; _kb = kb; _launchSpeed = launchSpeed; HullAC = killed.GetHullAC(); HullHitpoints = killed.CalculateHullHitpoints(); HullRecharge = killed.CalculateHullRepairRate(); ShieldAC = killed.GetShieldAC(); ShieldHitpoints = killed.CalculateShieldHitpoints(); ShieldRecharge = killed.CalculateShieldRepairRate(); AmmoClip = (_object1 is Probe) ? ((Probe)_object1).IGCProbe.AmmoCapacity : (short)((Ship)_object1).IGCShip.AmmoCapacity; Battery = (_object1 is Ship) ? ((Ship)_object1).CalculateEnergy() : 0F; DamageIndices = shooter.Core.Constants.DamageIndexes; Mods = shooter.Team.CalculateFactors(); if (shooter is Ship) { Ship ship = (Ship)shooter; shipCargo = new IGCCorePart[5]; for (int i = 0; i < ship.Cargo.Length; i++) { shipCargo[i] = ship.Cargo[i]; } firingMissile = ship.Missile; } Calculate(); }
public ObjectForm(TekSettings settings, AllegObject obj) : this() { _settings = settings; _object = obj; this.ForeColor = obj.Team.TeamColor; this.Text = string.Concat(obj.Team.Faction.Name, ": ", obj.Name); InfoToolTip.Active = settings.ShowToolTips; }
public Comparison(AllegObject shooter, float kb, float accuracy, float launchSpeed) { _object1 = shooter; _kb = kb; _accuracy = accuracy; _launchSpeed = launchSpeed; AmmoClip = (_object1 is Probe) ? ((Probe)_object1).IGCProbe.AmmoCapacity : (short)((Ship)_object1).IGCShip.AmmoCapacity; Battery = (_object1 is Ship) ? ((Ship)_object1).CalculateEnergy() : 0F; Mods = shooter.Team.CalculateFactors(); if (shooter is Ship) { Ship ship = (Ship)shooter; shipCargo = new IGCCorePart[5]; for (int i = 0; i < ship.Cargo.Length; i++) { shipCargo[i] = ship.Cargo[i]; } firingMissile = ship.Missile; } Calculate(); }