2026-04-13 스킬,퀵슬롯 시스템 수정중

This commit is contained in:
2026-04-13 18:04:55 +09:00
parent de0ba90953
commit 71a6fda0da
57 changed files with 9074 additions and 59 deletions

View File

@@ -0,0 +1,41 @@
using UnityEngine;
public class QuickSlotController : MonoBehaviour
{
private QuickSlot[] _slots;
private void Awake()
{
_slots = GetComponentsInChildren<QuickSlot>(true);
}
private void Start()
{
foreach (var slot in _slots)
{
if (string.IsNullOrEmpty(slot.SlotName)) continue;
QuickSlot captured = slot;
GameManager.Instance.Level.BindSlotAction(captured.SlotName, (state) => captured.Execute(state));
}
}
// 외부(스킬창/SkillModule 등)에서 슬롯에 등록할 때 호출
public void RegisterEntry(string slotName, UseableEntry entry)
{
foreach (var slot in _slots)
{
if (slot.SlotName == slotName)
{
slot.SetEntry(entry);
return;
}
}
}
public QuickSlot GetSlot(string slotName)
{
foreach (var slot in _slots)
if (slot.SlotName == slotName) return slot;
return null;
}
}