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

public class GhostbusterScript : MonoBehaviour {

    public GameObject deathAnimation;

    private void Update()
    {


        if (Input.GetKeyDown(KeyCode.R))
        {
            Die();
        }
    }
    public void Die()
    {
        GameObject deathAnim = (GameObject)Instantiate(deathAnimation, transform.position, transform.rotation);
        deathAnim.transform.localScale = gameObject.transform.localScale;
        Destroy(gameObject);
    }
}
