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

public class FloatEffect : MonoBehaviour
{
    private void Start()
    {
        Invoke("disappear", 0.2f);
    }

    private void disappear()
    {
        GetComponent<Collider>().enabled = false;
    }

    private void OnTriggerEnter(Collider other)
    {
        if (other.gameObject.layer == 8)
        {
            GameObject ga = other.transform.parent.parent.parent.gameObject;
            ga.GetComponent<Enemy>().FloatStateOn();
        }
    }
}
