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

public class KillPlayer : MonoBehaviour {

    Animator anim;

	// Use this for initialization
	void Start () {
        anim = GetComponent<Animator>();
	}
	
	// Update is called once per frame
	void Update () {
		
	}

    void OnCollisionEnter2D (Collision2D Collision)
    {
        if(Collision.gameObject.tag == "Enemy")
        {
            anim.SetFloat("State", 400);
            Application.LoadLevel("MainMenu");
        }
    }
}
