using UnityEngine;
using System.Collections;

public class PlayerPickup : MonoBehaviour
{
    public Player player;

    // Use this for initialization
    void Start()
    {
        player = transform.parent.GetComponent<Player>();
        
    }

    // Update is called once per frame
    void Update()
    {
        //Debug.Log("score:" + player.score); 

    }
    void OnTriggerEnter2D(Collider2D other)
    {
        if (other.gameObject.CompareTag("Pickup"))
        {
            other.gameObject.SetActive(false);
            player.PickupObject();
        }
    }
}
