1234567891011121314151617181920212223242526272829303132333435 |
- using System.Collections.Generic;
- using Blue;
- using UnityEngine;
- public interface IQueueSystem : IService
- {
- BindableProperty<int> Level3QueueCount { get; }
- HashSet<GameObject> Level3List{ get;}
- void Add(GameObject go);
- void Remove(GameObject go);
- }
- public class QueueSystem : IQueueSystem
- {
- public BindableProperty<int> Level3QueueCount { get; set; } = new BindableProperty<int>();
- public HashSet<GameObject> Level3List { get; set; } = new HashSet<GameObject>();
- 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;
- }
- }
|