34 lines
908 B
C#
34 lines
908 B
C#
using Obvious.Soap;
|
|
using UFS3;
|
|
using UnityEngine;
|
|
|
|
public class UI_EquipmentPanel_OLD : MonoBehaviour
|
|
{
|
|
private UI_ItemBox itemBoxTemplate;
|
|
|
|
[SerializeField]
|
|
private IntVariable itemCellsAmount;
|
|
|
|
[SerializeField]
|
|
private ScriptableListItemData playerEquipment;
|
|
|
|
private void Start()
|
|
{
|
|
itemBoxTemplate = GetComponentInChildren<UI_ItemBox>(includeInactive: true);
|
|
int missingCells = itemCellsAmount.Value;
|
|
playerEquipment.ForEach(delegate(BaseItemData x)
|
|
{
|
|
UI_ItemBox uI_ItemBox2 = Object.Instantiate(itemBoxTemplate, itemBoxTemplate.transform.parent);
|
|
uI_ItemBox2.Initialize(x);
|
|
uI_ItemBox2.gameObject.SetActive(value: true);
|
|
missingCells--;
|
|
});
|
|
for (int num = 0; num < missingCells; num++)
|
|
{
|
|
UI_ItemBox uI_ItemBox = Object.Instantiate(itemBoxTemplate, itemBoxTemplate.transform.parent);
|
|
uI_ItemBox.SetEmpty();
|
|
uI_ItemBox.gameObject.SetActive(value: true);
|
|
}
|
|
}
|
|
}
|