예제 #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;
 }