initial
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace AfterHours.Shop
|
||||
{
|
||||
/// <summary>
|
||||
/// Serverseitige Liste aller aktiven Regalfächer. Damit Kunden ein
|
||||
/// passendes Fach finden können, ohne FindObjectOfType im Frame-Loop
|
||||
/// aufzurufen (siehe CLAUDE.md §5).
|
||||
/// </summary>
|
||||
public sealed class ShelfRegistry
|
||||
{
|
||||
public static readonly ShelfRegistry Instance = new();
|
||||
|
||||
private readonly List<ShelfSlot> _slots = new();
|
||||
|
||||
public IReadOnlyList<ShelfSlot> Slots => _slots;
|
||||
|
||||
public void Register(ShelfSlot slot) => _slots.Add(slot);
|
||||
|
||||
public void Unregister(ShelfSlot slot) => _slots.Remove(slot);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user