void SetupShellPool() { GameObject templateShell = (GameObject) Instantiate(GameDatabase.Instance.GetModel("BDArmory/Models/shell/model")); templateShell.SetActive(false); templateShell.AddComponent<ShellCasing>(); shellPool = ObjectPool.CreateObjectPool(templateShell, 50, true, true); }
void SetupFlarePool() { GameObject cm = (GameObject)Instantiate(GameDatabase.Instance.GetModel("BDArmory/Models/CMFlare/model")); cm.SetActive(false); cm.AddComponent <CMFlare>(); flarePool = ObjectPool.CreateObjectPool(cm, 10, true, true); }
void SetupBulletPool() { GameObject templateBullet = new GameObject("Bullet"); templateBullet.SetActive(false); templateBullet.AddComponent<PooledBullet>(); bulletPool = ObjectPool.CreateObjectPool(templateBullet, 100, true, true); }