Пример #1
0
        public void Explode(Bubble bubble)
        {
            var bubbles = grid.BubblesInRange(bubble, ExplosionRange);

            foreach (var bb in bubbles)
            {
                bb.Movement.Drop();
                bb.StartCoroutine(DelayDespawn(bb, 3f));
            }
            grid.Detach(bubble);
            spawner.Return(bubble);
            Debug.Log("Exploded!");
        }
Пример #2
0
        System.Collections.IEnumerator DelayReturn(Bubble bubble, float time)
        {
            grid.Detach(bubble);
            yield return(new WaitForSeconds(time));

            spawner.Return(bubble);
        }