using UnityEngine;
using System.Collections;

public class Money : MonoBehaviour {

    public GameObject player;
    public GameObject gameManager;
    public float winDelay;

	// Use this for initialization
	void Start () {
	
	}
	
	// Update is called once per frame
	void Update () {
	
	}

    void OnTriggerEnter2D(Collider2D other){
        Debug.Log("MONEY!");
        if(other.gameObject.CompareTag("Player")){
            print("win");
            gameManager.SendMessage("Win", winDelay);
        }
    }
}
