Exemplo n.º 1
0
    void OnTriggerEnter2D(Collider2D col)
    {
        Ball ball = col.GetComponent <Ball>();

        if (ball && ball.canCatch && !worm.carrying)
        {
            worm.Catch();
            Destroy(col.gameObject);
        }
    }