using System.Collections.Generic;
using UnityEngine;

public class TankListView : MonoBehaviour
{
    [SerializeField] private List<TankStockView> tankStockViews;

    public void SetTanksView(List<StorageTank> tanks)
    {
        var tankCount = tanks.Count;
        var index = 0;
        foreach (var tankView in tankStockViews)
        {
            if (index >= tankCount)
            {
                tankView.SetTankRelease(false);
                continue;
            }
            tankView.SetTankRelease(true);
            tankView.SetStock(tanks[index]);
            index++;
        }
    }
}
