Exemple #1
0
 private void OnBubbleGroupReaction(BubbleGroupReactionEvent gameEvent)
 {
     foreach (var bubble in gameEvent.bubbles)
     {
         AddBubble(gameEvent.priority, bubble);
     }
 }
Exemple #2
0
    private void ProcessHitGroup(RaycastHit2D[] hits, float delay)
    {
        List <Bubble> bubbles = null;

        foreach (var hit in hits)
        {
            var bubble = hit.collider.gameObject;

            if (bubble.tag == StringConstants.Tags.BUBBLES)
            {
                var model = bubble.GetComponent <BubbleModelBehaviour>().Model;

                if (model.Active || (bubble == gameObject))
                {
                    bubbles = bubbles ?? new List <Bubble>();
                    bubbles.Add(model);
                    AddDeathAnimation(bubble);
                }
            }
        }

        if (bubbles != null)
        {
            BubbleGroupReactionEvent.Dispatch(ReactionPriority.PowerUp, bubbles, delay);
        }
    }