using System.Collections.Generic;
using UnityEngine;

public class HealSpawner : MonoBehaviour
{
    public bool isEnabled = true;
    public GameObject heal;
    public int chance = 100;
    
    // Spawns the heal when the Spawner is generated
    private void Start()
    {
        gameObject.GetComponent<SpriteRenderer>().enabled = false;
        if (isEnabled)
        {
            if (chance > Random.Range(0, 100))
            {
                Instantiate(heal, gameObject.transform);
                //Instantiate(heal, new Vector3(transform.position.x, transform.position.y, 0), Quaternion.identity);
            }
        }
    }
}
