Example #1
0
    private void OnTriggerEnter2D(Collider2D collider)
    {
        Ball ball = collider.GetComponentInParent <Ball>();

        if (ball != null)
        {
            _aliveDisplay.SetActive(false);
            _deadDisplay.SetActive(true);
            _owner.GoalDestroyed();
        }
    }