Example #1
0
    private void PoppedHandler(Bubble bubble)
    {
        RemoveListeners();

        gameObject.layer = (int)Layers.IgnoreRayCast;
        BubbleDeath.KillBubble(gameObject, BubbleDeathType.Pop);
    }
Example #2
0
    private IEnumerator CullAfterFallingDistance(float distance)
    {
        var total        = 0.0f;
        var myTransform  = transform;
        var lastPosition = myTransform.localPosition;

        while (total < distance)
        {
            var position = myTransform.localPosition;

            if (position.y < lastPosition.y)
            {
                gameObject.layer = (int)Layers.FallingObjects;
                total           += (position - lastPosition).magnitude;
            }

            lastPosition = position;
            yield return(null);
        }

        BubbleDeath.KillBubble(gameObject, BubbleDeathType.Cull);
    }
Example #3
0
 override protected void CullBubble(Bubble bubble)
 {
     BubbleDeath.KillBubble(gameObject, BubbleDeathType.Cull);
 }
 protected void OnTriggerEnter2D(Collider2D collider)
 {
     BubbleDeath.KillBubble(collider.gameObject, BubbleDeathType.Cull);
 }