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

public class InformationPanelManager : MonoBehaviour
{
    public CityDetailsPanel cityPanel;
    public static InformationPanelManager _instance;

    void Awake()
    {
        _instance = this;
    }

    // Update is called once per frame
    public void DeactivatePanels()
    {
        foreach (var panel in GetComponentsInChildren<DetailsPanel>())
        {
            panel.Deactivate();
        }
    }

    public static void ActivateCity(City city)
    {
        _instance.DeactivatePanels();
        _instance.cityPanel.Activate(city);
    }
}
