인벤토리 기능 추가

This commit is contained in:
2026-01-27 00:34:47 +09:00
parent 658cd58e30
commit 48466bcc0f
73 changed files with 4779 additions and 228 deletions

View File

@@ -0,0 +1,36 @@
using UnityEngine;
public class UI_Inven : UI_Scene
{
enum GameObjectgs
{
GridPanel,
}
void Start()
{
Init();
}
public override void Init()
{
base.Init();
Bind<GameObject>(typeof(GameObjectgs));
GameObject gridPanel = Get<GameObject>((int)GameObjectgs.GridPanel);
foreach (Transform child in gridPanel.transform)
{
Managers.Resource.Destroy(child.gameObject);
}
// 실제 인벤토리 정보를 참고해서
for (int i = 0; i < 8; i++)
{
// GameObject item = Managers.UI.MakeSubItem<UI_Inven_Item>(gridPanel.transform).gameObject;
GameObject item = Managers.UI.MakeSubItem<UI_Inven_Item>(parent: gridPanel.transform).gameObject;
UI_Inven_Item invenItem = item.GetOrAddComponent<UI_Inven_Item>();
invenItem.SetInfo($"집행검{i}번");
}
}
}