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

public class BeSearchTrigger : MonoBehaviour
{
    public GameObject owner;

    private void Awake()
    {
        if (GetComponentInParent<PlayerController>())
        {
            owner = GetComponentInParent<PlayerController>().gameObject;
        }
        else if (GetComponentInParent<Demonic>())
        {
            owner = GetComponentInParent<Demonic>().gameObject;
        }
        else if (GetComponentInParent<Tower>())
        {
            owner = GetComponentInParent<Tower>().gameObject;
        }
        else if (GetComponentInParent<Enemy>())
        {
            owner = GetComponentInParent<Enemy>().gameObject;
        }
        else if (GetComponentInParent<EnemyTower>())
        {
            owner = GetComponentInParent<EnemyTower>().gameObject;
        }
    }
}
