protected override void Tick(float deltaTime) { if (_targeter != null) { _weapon.Firing = false; if (_targeter.AngularTargetDistance() < AngleTolerance) { _weapon.SetRange(Assembly.GetRange()); _weapon.Firing = true; _weapon.Target = _targeter?.GetTarget(); } } else { _weapon.Fire(); } }
///<inheritdoc /> protected override bool ValidateCondition() { //Check if a target is present. return(_targeter.GetTarget() != null); }