Exemple #1
0
 // overrides the current target without scanning
 public void OverrideCurrentTarget(Unit newTarget)
 {
     CurrentTarget = newTarget;
     if (!_detectedTargets.TryGetValue(newTarget, out DetectedTarget entry))
     {
         _detectedTargets.Add(newTarget, new DetectedTarget()
         {
             Target            = newTarget,
             DetectedThisFrame = true,
             DetectionValue    = MaxDetection
         });
     }
     CurrentDetectable     = _detectedTargets[newTarget];
     HighestDetectedTarget = null;
     _detectedTargets.Clear();
     OnCurrentTargetSet?.Invoke(newTarget);
 }
Exemple #2
0
 public void ClearCurrentTarget()
 {
     CurrentTarget     = null;
     CurrentDetectable = null;
     OnCurrentTargetSet?.Invoke(null);
 }