Ejemplo n.º 1
0
         protected void ProcessTargetSearch(Characters currentCharacter)
         {
             var availableTargets = characterList
                 .Where(t => IsWithinRange(currentCharacter.X, currentCharacter.Y, t.X, t.Y, currentCharacter.Range)).ToList();
             
             if (availableTargets.Count == 0)
             {
                 return;
             }

             var target = currentCharacter.GetTarget(availableTargets);

             if (target == null)
             {
                 return;
             }

             ProcessInteraction(currentCharacter,target);

         }