using UnityEngine;
using System.Collections;

public class end : MonoBehaviour {

	// Use this for initialization
	void Start () {
	
	}
	
	// Update is called once per frame
	void Update () {
	
	}
    public void OnCollisionEnter(Collision cl)
    {
        if (cl.gameObject.name == "player")
        {
            Player pl = cl.gameObject.GetComponent<Player>();
            if (pl != null)
            {
                pl.st = GameState.win;
                return;
            }
        }
    }
}
