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

public class UnitTreeManager : MonoBehaviour
{
    private List<UnitTreeDisplay> oogaDisplay = new List<UnitTreeDisplay>();

    private void Start()
    {
        
    }
    //Shows the unit's upgrades around its position
    public void ShowUpgrades(Vector3 position)
    {
        Vector3 m_Position = position;

        //Instantiate UnitTreeDisplay rect 3 times
        for (int i = 0; i < 3; i++)
        {
            GameObject rect = new GameObject();
            Vector3 rectPosition = m_Position;
            rectPosition.x += 10.0f * i;
            GameObject instance = Instantiate(rect, rectPosition, transform.rotation);
            instance.AddComponent<RectTransform>();
            UnitTreeDisplay ooga = instance.AddComponent<UnitTreeDisplay>();
            ooga.SetPosition(rectPosition);
        }

        //Instantiate line (later curved line? https://forum.unity.com/threads/easy-curved-line-renderer-free-utility.391219/)
        
        //TODO later... Get unit's next upgrades
    }
}
