using ScrambleKit.Hits;
using UnityEngine;

public class HeartContainer : MonoBehaviour 
{

    public void OnCollisionEnter2D(Collision2D col)
    {
        if (col.gameObject.tag == "Player")
        {
            GameProgress.PlayerMaxHP += 2;
            HitPoints hp = col.gameObject.GetComponent<HitPoints>();
            hp.MaxHP = GameProgress.PlayerMaxHP;
            hp.HP = hp.MaxHP;

            Destroy(gameObject);
        }
    }

}
