Newer
Older
DungeonShooting / DungeonShooting_Godot / src / game / manager / ObjectManager.cs
@小李xl 小李xl on 2 Nov 2023 356 bytes 完成对象池基础功能
  1.  
  2. public static class ObjectManager
  3. {
  4. public static Explode GetExplode(string resPath)
  5. {
  6. var explode = ObjectPool.GetItem<Explode>(resPath);
  7. if (explode == null)
  8. {
  9. explode = ResourceManager.LoadAndInstantiate<Explode>(resPath);
  10. explode.Logotype = resPath;
  11. }
  12.  
  13. return explode;
  14. }
  15. }