using System.Collections.Generic;
using Blue;
using UnityEngine;
///
/// 服务于三级菜单,用于统一开关
///
public interface IQueueSystem : IService
{
BindableProperty Level3QueueCount { get; }
HashSet Level3List{ get;}
void Add(GameObject go);
void Remove(GameObject go);
}
public class QueueSystem : IQueueSystem
{
public BindableProperty Level3QueueCount { get; set; } = new BindableProperty();
public HashSet Level3List { get; set; } = new HashSet();
public void OnInit()
{
}
public void Add(GameObject go)
{
Level3List.Add(go);
Level3QueueCount.Value = Level3List.Count;
}
public void Remove(GameObject go)
{
Level3List.Remove(go);
Level3QueueCount.Value = Level3List.Count;
}
}