using UnityEngine;
using System.Collections;
using UnityEngine.SceneManagement;

public class DeathZone : MonoBehaviour {

    public Transform spawnPlayer1;
    public Transform spawnPlayer2;


    void OnTriggerEnter2D(Collider2D other)
    {
        if (other.gameObject.tag == "Player1")
        {
            other.gameObject.transform.position = spawnPlayer1.position;

            
        }
        if (other.gameObject.tag == "Player2")
        {
            other.gameObject.transform.position = spawnPlayer2.position;
        }
    }
}
