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

public class RefreshUpgrades : MonoBehaviour
{
    // Array of upgrade GameObjects to refresh
    public GameObject[] upgrades;

    /// <summary>
    /// Called when the GameObject becomes enabled and active.
    /// </summary>
    public void OnEnable()
    {
        // Loop through each upgrade GameObject
        foreach (GameObject upgrade in upgrades)
        {
            // Call the GetUpgrade method on the Upgrade component of each upgrade GameObject
            upgrade.GetComponent<Upgrade>().GetUpgrade();
        }
    }
}
