using UnityEngine;
using System.Collections;

public class BlackholeDestroyer : MonoBehaviour 
{
    public GameObject goBH;
    private Blackhole blackhole;

    void Start()
    {
        blackhole = goBH.GetComponent<Blackhole>();
    }

	void OnTriggerEnter(Collider other)
    {
        GameObject go = other.gameObject;

        if (go.GetComponent<Player>() == null)
        {
            blackhole.ParticleEaten(go);
            Destroy(go, 0.1f);
        }
    }
}
