장보기 프로젝트

This commit is contained in:
2026-04-14 18:02:07 +09:00
commit dc19679985
2658 changed files with 235852 additions and 0 deletions

View File

@@ -0,0 +1,43 @@
using UnityEngine;
using VRShopping.Items;
namespace VRShopping.UI
{
public class ItemInfoHud : MonoBehaviour
{
public static ItemInfoHud Instance { get; private set; }
[SerializeField] private ItemInfoPanel _leftPanel;
[SerializeField] private ItemInfoPanel _rightPanel;
private void Awake()
{
if (Instance != null && Instance != this)
{
Destroy(gameObject);
return;
}
Instance = this;
}
private void OnDestroy()
{
if (Instance == this) Instance = null;
}
public void Show(Handedness hand, ItemData data)
{
GetPanel(hand)?.Show(data);
}
public void Hide(Handedness hand)
{
GetPanel(hand)?.Hide();
}
private ItemInfoPanel GetPanel(Handedness hand)
{
return hand == Handedness.Left ? _leftPanel : _rightPanel;
}
}
}