using UnityEngine;
using System.Collections;

public class success : MonoBehaviour {
    public GameObject playerRef;
    public GameManager gameManager;
    public AudioClip winClip;
    // Use this for initialization
    void Start () {
        playerRef = GameObject.FindGameObjectWithTag("Player");
    }
    void OnTriggerEnter(Collider other)
    {
        if (other.gameObject.tag == "Player")
        {
            //playerRef.transform.position = new Vector3(0.186f, 3.3f, -4);
            playerRef.transform.rotation = Quaternion.Euler(Vector3.forward);
            gameManager.State = GameState.Win;
            //AudioSource.PlayClipAtPoint(winClip, transform.position);
        }
    }
    // Update is called once per frame
    void Update () {
        
    }
}
