예제 #1
0
    void CreateHeroSlotPool()
    {
        int cnt = 0;

        heroSlotPool = new ObjectPools <PoolableObject>(2, () =>
        {
            heroSlot[cnt].Create(heroSlotPool);
            return(heroSlot[cnt++]);
        });
        heroSlotPool.Allocate();
    }