Newer
Older
DungeonShooting / DungeonShooting_Godot / src / game / manager / ObjectManager.cs
@小李xl 小李xl on 2 Nov 2023 356 bytes 完成对象池基础功能

public static class ObjectManager
{
    public static Explode GetExplode(string resPath)
    {
        var explode = ObjectPool.GetItem<Explode>(resPath);
        if (explode == null)
        {
            explode = ResourceManager.LoadAndInstantiate<Explode>(resPath);
            explode.Logotype = resPath;
        }

        return explode;
    }
}