Пример #1
0
 protected virtual void HitBloon(BloonController bloonToHit)
 {
     _bloonHitsRemaining--;
     if (_bloonHitsRemaining <= 0)
     {
         DestroyHazard();
     }
 }
Пример #2
0
        public static Vector3 First(IReadOnlyList <BloonController> bloons)
        {
            var furthestBloon = bloons[0];

            for (var i = 1; i < bloons.Count; i++)
            {
                furthestBloon = BloonController.CompareGreaterPathProgress(furthestBloon, bloons[i]);
            }

            return(furthestBloon.transform.position);
        }
Пример #3
0
        public static Vector3 Weakest(IReadOnlyList <BloonController> bloons)
        {
            var weakestBloon = bloons[0];

            for (var i = 1; i < bloons.Count; i++)
            {
                weakestBloon = BloonController.CompareWeakest(weakestBloon, bloons[i]);
            }

            return(weakestBloon.transform.position);
        }
Пример #4
0
        public static Vector3 Last(IReadOnlyList <BloonController> bloons)
        {
            var lastBloon = bloons[0];

            for (var i = 1; i < bloons.Count; i++)
            {
                lastBloon = BloonController.CompareLeastPathProgress(lastBloon, bloons[i]);
            }

            return(lastBloon.transform.position);
        }
Пример #5
0
 private void SetupBloonEvents(BloonController bloonController)
 {
     bloonController.OnBloonReachedEndOfPath += BloonEndOfPath;
     bloonController.OnBloonPopped           += BloonPopped;
 }