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

public class BaseBullet : MonoBehaviour {

    public int damage;
    [HideInInspector]
    
	public GameObject owner;


	void OnTriggerEnter2D(Collider2D other)
	{
		if (gameObject.activeSelf == true && other.gameObject != owner)
		{
			gameObject.SetActive(false);
            other.gameObject.GetComponent<HealthScript>().TakeDamage(damage);
            print(other.gameObject.GetComponent<HealthScript>().GetHealth());
            Destroy(gameObject);
		}
	}
}
