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

public class Player : MonoBehaviour
{
    public bool isDead = false;

    public void MakeDeath()
    {
        isDead = true;
    }

    public void OnCollisionEnter(Collision collision)
    {
        
        if(collision.gameObject.tag == "bullet") 
        {
            SphericalProjectileScript projectile = collision.gameObject.GetComponent<SphericalProjectileScript>();

            if( projectile.duration > 0.5){
                MakeDeath();
                Destroy(collision.gameObject); 
            }
        }
    }
}
