void Start() { poolAbleObject = GameObject.FindGameObjectWithTag("GameManager").GetComponent <PoolAbleObject>(); #region xSpawnPoints //did it manually for spawner points xSpawnPositions[0] = 6.4f; xSpawnPositions[1] = 4.7f; xSpawnPositions[2] = 3.2f; xSpawnPositions[3] = 1.5f; xSpawnPositions[4] = 0; xSpawnPositions[5] = -1.6f; #endregion for (int i = 0; i < cars.Length; i++) { GameObject car = Instantiate(cars[i], spawnPoint, Quaternion.LookRotation(Vector3.back)); poolAbleObject.AddCarTheList(car); car.SetActive(false); SpawnCarConfigure(car); } StartCoroutine(CarWave()); }
private void Start() { poolAbleObject = GameObject.FindGameObjectWithTag("GameManager").GetComponent <PoolAbleObject>(); myGameobject = gameObject; Invoke("PoolTheObject", 15); }
private void Start() { poolAbleObject = GameObject.FindGameObjectWithTag("GameManager").GetComponent <PoolAbleObject>(); }