using UnityEngine;
using System.Collections;
using Assets.Scripts;

public class Collectible : MonoBehaviour
{
    private GameObject _player;

    void Start()
    {
        _player = GameObject.FindWithTag("Player");
    }

    void Update()
    {
    }

    void OnTriggerEnter2D(Collider2D other)
    {
        Destroy(gameObject);
        _player.GetComponent<Player>().Score += 50;
        _player.GetComponent<Player>().Progression += 1;
        _player.GetComponent<Player>().NbVials += 1;
    }
}