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

public class ScientistScript : MonoBehaviour {
    
	public enum ScientistColor
    {
        orange, green, blue
    };
    public ScientistColor scientistColor;
    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;
        GameObject flame = deathAnim.transform.Find("Dying Flame").gameObject;

        if (gameObject.tag != "Possessed")
        {
            
            Destroy(flame);
        }

        Destroy(gameObject);
    }



}
