Пример #1
0
    public void SetPlayerBulletsPool()
    {
        if (m_playerBullets != null)
        {
            m_playerBullets.ClearPool();
        }

        m_playerBullets = new GameObjectPool(m_playerBulletPrefab, m_playerBulletsPoolSize, "Player Bullets Pool");
    }
Пример #2
0
 public static void Clear(string prefabName)
 {
     if (_instance == null)
     {
         return;
     }
     if (string.IsNullOrEmpty(prefabName))
     {
         _instance.ClearAll();
         return;
     }
     _instance.ClearPool(prefabName);
 }