38 lines
836 B
C#
38 lines
836 B
C#
using Logic.Inventory.Scripts;
|
|
using UnityEngine;
|
|
|
|
namespace Logic.UI
|
|
{
|
|
public enum QueueType
|
|
{
|
|
ReadyQueue,
|
|
ProgressQueue
|
|
}
|
|
|
|
public class UIQueueManager : MonoBehaviour
|
|
{
|
|
[SerializeField] private UIQueue readyUIQueue;
|
|
[SerializeField] private UIQueue progressUIQueue;
|
|
|
|
public void Add(ItemObject item, QueueType type)
|
|
{
|
|
if (type == QueueType.ProgressQueue)
|
|
{
|
|
progressUIQueue.Add(item);
|
|
return;
|
|
}
|
|
readyUIQueue.Add(item);
|
|
}
|
|
|
|
public void Remove(QueueType type)
|
|
{
|
|
if (type == QueueType.ProgressQueue)
|
|
{
|
|
progressUIQueue.Remove();
|
|
return;
|
|
}
|
|
readyUIQueue.Remove();
|
|
}
|
|
}
|
|
}
|