public void SpawnAutomatic(int index = -1) { AISpawnAutomaticData auto = AISpawnAutomaticData.CreateAutomaticData(mDelay, mID); if (auto != null) { StartCoroutine(SpawnCoroutine(auto, index)); } else { Debug.LogError("Can't fin automatic data!"); } }
void FixWaveIndex() { if (mCurrentTimer != null) { AISpawnAutomaticData auto = AISpawnAutomaticData.CreateAutomaticData(0.0f, mCurrentTimer.spawnId); if (auto != null) { if (mCurrentTimer.currentWave == auto.data.data.Count - 1) { if (GetComponentsInChildren <SPPointSimulate>().Length == 0) { mCurrentTimer.currentWave = auto.data.data.Count; } } } } }