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

public class CannonBarrel : MonoBehaviour
{
    private void OnTriggerEnter(Collider other)
    {
        if(other.gameObject.tag.Equals("Cannonball") && other.gameObject.GetComponent<Cannonball>().hasHitObstacle)
        {
            //Game Lost
            Destroy(other.gameObject);
            GameEvents.instance.TriggerOnGameLostEvent();
        }
    }
}
