mirror of
https://github.com/DerTyp7/harvestdale-unity.git
synced 2025-10-30 13:07:10 +01:00
GuiManager
This commit is contained in:
@@ -2,7 +2,7 @@ using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class InventoryUI : MonoBehaviour
|
||||
public class InventoryUI : GuiPanel
|
||||
{
|
||||
[SerializeField] private GameObject slotPrefab;
|
||||
[SerializeField] private GameObject slotListObj;
|
||||
@@ -15,10 +15,16 @@ public class InventoryUI : MonoBehaviour
|
||||
playerInventory = GameObject.FindGameObjectWithTag("Player").GetComponent<Inventory>();
|
||||
Inventory.OnPlayerInventoryChanged += UpdateSlots;
|
||||
CreateSlots();
|
||||
}
|
||||
public override void OnOpen()
|
||||
{
|
||||
UpdateSlots();
|
||||
|
||||
}
|
||||
|
||||
public override void OnClose()
|
||||
{
|
||||
|
||||
}
|
||||
private void CreateSlots()
|
||||
{
|
||||
playerInventory = GameObject.FindGameObjectWithTag("Player").GetComponent<Inventory>();
|
||||
|
||||
Reference in New Issue
Block a user