using UnityEngine;
using System.Collections;

public class VictimKiller : MonoBehaviour {
    private GameManager gameManager;

    void Start() {
        gameManager = FindObjectOfType<GameManager>();
    }

    public void OnCollisionEnter(Collision collision) {
        if (collision.gameObject.tag == "Victim") {
            Instantiate(gameManager.enemy, collision.gameObject.transform.position, Quaternion.identity);
            Destroy(collision.gameObject);
        }
    }
}
