using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class BallCheckOut : MonoBehaviour
{
    [SerializeField] int type = 0;
    private void OnCollisionEnter(Collision collision)
    {
        if (collision.gameObject.CompareTag("Ball"))
        {   
            if (GetComponent<AudioSource>() != null)
            GetComponent<AudioSource>().Play();
            
            if (type == 1)
            {
                GameManager.intance.MainCamera.GetComponent<ShakeCamera>().PlayCameraShake(0.4f);
            }
        }
    }
}
