public override void AddSubtlety(int addition) { TParameters oldParameters = _parameters; base.AddSubtlety(addition); UpdateParameters(oldParameters); }
public override void AddWeight(int addition) { TParameters oldParameters = _parameters; base.AddWeight(addition); UpdateParameters(oldParameters); }
public override void AddObservation(int addition) { TParameters oldParameters = _parameters; base.AddObservation(addition); UpdateParameters(oldParameters); }
public override void AddSharpshooting(int addition) { TParameters oldParameters = _parameters; base.AddSharpshooting(addition); UpdateParameters(oldParameters); }
public override void AddNumberOfGuns(TShipParts addition) { TParameters oldParameters = _parameters; base.AddNumberOfGuns(addition); UpdateParameters(oldParameters); }
public override void AddInitiative(int addition) { TParameters oldParameters = _parameters; base.AddInitiative(addition); UpdateParameters(oldParameters); }
public override void AddHitPoints(TShipParts addition) { TParameters oldParameters = _parameters; base.AddHitPoints(addition); UpdateParameters(oldParameters); }
public override void AddArmour(TShipParts addition) { TParameters oldParameters = _parameters; base.AddArmour(addition); UpdateParameters(oldParameters); }
public void Execute(TBaseShipController shipController, TShip ship, TDirection direction) { TParameters damage = _damageController.CalculateDamage(shipController.CurrentShip, ship, direction); TShipParts oldHitPoints = ship.Current.Parameters.HitPoints; ship.Current.Parameters -= damage; ship.Storage.OnDamage(oldHitPoints, ship.Current.Parameters.HitPoints); }
/// <summary> /// Is virtual needed? /// </summary> /// <param name="parameters"></param> protected virtual void SetParameters(TParameters parameters) { AddArmour(parameters.Armour - this.Parameters.Armour); AddDraft(parameters.Draft - this.Parameters.Draft); AddHitPoints(parameters.HitPoints - this.Parameters.HitPoints); AddInitiative(parameters.Initiative - this.Parameters.Initiative); AddLuck(parameters.Luck - this.Parameters.Luck); AddMoral(parameters.Moral - this.Parameters.Moral); AddNumberOfGuns(parameters.NumberOfGuns - this.Parameters.NumberOfGuns); AddObservation(parameters.Observation - this.Parameters.Observation); AddSharpshooting(parameters.Sharpshooting - this.Parameters.Sharpshooting); AddSpeed(parameters.Speed - this.Parameters.Speed); AddSubtlety(parameters.Subtlety - this.Parameters.Subtlety); AddWeight(parameters.Weight - this.Parameters.Weight); }
public static TParameters operator -(TParameters first, TParameters second) { TParameters result = new TParameters(); result.Observation = first.Observation - second.Observation; result.Subtlety = first.Subtlety - second.Subtlety; result.Armour = first.Armour - second.Armour; result.HitPoints = first.HitPoints - second.HitPoints; result.NumberOfGuns = first.NumberOfGuns - second.NumberOfGuns; result.Sharpshooting = first.Sharpshooting - second.Sharpshooting; result.Speed = first.Speed - second.Speed; result.Draft = first.Draft - second.Draft; result.Weight = first.Weight - second.Weight; result.Luck = first.Luck - second.Luck; result.Moral = first.Moral - second.Moral; result.Initiative = first.Initiative - second.Initiative; return(result); }
public void UpdateParameters(TParameters oldParameters) { throw new NotImplementedException(); ///////////// TO DO ///////////// }