public void Init() { _spawnedObjects = new List <GameObject>(); _comboManager = GameObject.FindGameObjectWithTag("Combo").GetComponent <Combos> (); SpawnLocations = new List <Transform>(); for (int i = 0; i < transform.childCount; ++i) { SpawnLocations.Add(transform.GetChild(i)); } _lockObject = new Object(); SpawnObjects(); _comboManager.StartCombo(); }
public void ReadyToSpawn() { lock (_lockObject) { _readyToSpawn++; if (_readyToSpawn == _spawnedObjects.Count) { SpawnObjects(); _readyToSpawn = 0; // switch turn GameManager.instance.CanShoot = true; _comboManager.StartCombo(); TurnNumber++; } } }