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

public class HexagonScript : MonoBehaviour {

    private void OnTriggerEnter2D(Collider2D other)
    {
        
        if (other.isTrigger)
        {
            return;
        }
        if(other.gameObject.tag != "Possessed")
        {
            return;
        }

        if(other.gameObject.GetComponent<SoldierShoot>() != null)
        {
            other.gameObject.GetComponent<SoldierShoot>().Die();
        }
        else if (other.gameObject.GetComponent<ScientistScript>() != null)
        {
            other.gameObject.GetComponent<ScientistScript>().Die();
        }

        
    }


}
