using UnityEngine;
using System.Collections;



public class Removable : MonoBehaviour {

    
    private ParticleSystem _particels;
    private AudioSource _audioSource;
    [SerializeField] private AudioSource _audioSourcePrefab;
    [SerializeField] private ParticleSystem _particelsPrefab;


    public void Remove()
    {
        _particels = Instantiate(_particelsPrefab, transform.position, Quaternion.Euler(new Vector3(-90, 0, 0))) as ParticleSystem;
        _audioSource = Instantiate(_audioSourcePrefab, transform.position, Quaternion.identity) as AudioSource;
        _audioSource.Play();
        Destroy(gameObject);
    }
}
