/// <summary>
 /// Clears attack panels and corresponding buttons.
 /// </summary>
 private void ClearAttackPanels()
 {
     UnitSelection.DetectTarget();
     UnitSelection.detectedEnemy = null;
     if (UnitSelection.enemySelector != null)
     {
         UnitSelection.enemySelector.SetActive(false);
     }
     foreach (GameObject actionBtn in actionButtons)
     {
         Destroy(actionBtn);
     }
     actionButtons.Clear();
 }