using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class Coin_Master : MonoBehaviour {

    public Slider LightBar;

    void Start()
    {
        LightBar.value = 0;
    }

    void OnTriggerEnter2D(Collider2D col)
    {
        Debug.Log("Enter");

        if (col.CompareTag("Player"))
        {
            LightBar.value += 1f;
            Destroy(gameObject);
        }
       
        

    }

}
