Skip to content
Snippets Groups Projects
BasketController.cs 419 B
Newer Older
william's avatar
william committed
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class BasketController : MonoBehaviour
{
    private Animator animator;

    private void Start()
    {
        animator = GetComponent<Animator>();
    }

    private void OnTriggerExit2D(Collider2D collision)
    {
        if (collision.CompareTag("Ball"))
        {
            animator.SetTrigger("score");
        }
    }
}