ChoiceItemPool.cs 721 B

123456789101112131415161718192021222324252627282930313233
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using UnityEngine;
  7. enum PoolType
  8. {
  9. CNSearchItem,
  10. CourseItem
  11. }
  12. public class ChoiceItemPool
  13. {
  14. private static ChoiceItemPool instance;
  15. public static ChoiceItemPool Instance
  16. {
  17. get
  18. {
  19. if (instance == null)
  20. {
  21. instance = new ChoiceItemPool();
  22. }
  23. return instance;
  24. }
  25. }
  26. private Dictionary<PoolType,Queue<GameObject>> pool = new Dictionary<PoolType,Queue<GameObject>>();
  27. public GameObject GetObj(string poolType)
  28. {
  29. return new GameObject();
  30. }
  31. }