Example #1
0
    void OnTriggerEnter2D(Collider2D other)
    {
        if (bubble == null)
        {
            bubble = GetComponentInParent <SpecialBubbleUnit> ();
        }

        if (other.CompareTag("Bubble"))
        {
            BubbleUnit otherBubble = other.GetComponent <BubbleUnit>();
            if (otherBubble != null)
            {
                bubble.DealEffectCleanBubble(otherBubble);
            }
        }
    }
Example #2
0
 void OnEnable()
 {
     bubble = GetComponentInParent <SpecialBubbleUnit> ();
 }