Пример #1
0
 private void ShootArrow()
 {
     // Shoot an Arrow
     if (enabledDirection.Count > 0) // Check if direction are enabled
     {
         foreach (LevelTools.DirectionList dir in enabledDirection) // Will shoot in every direction found
         {
             List<Arrow> AvailableArrows = linkedArrow.FindAll( (Arrow obj) => obj.Busy == false);
             if (AvailableArrows.Count > 0)
             {
                 launchArrow = AvailableArrows[AvailableArrows.Count -1];
                 launchArrow.giveDirection(dir);
             }
         }
     }
 }