예제 #1
0
    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!");
        }
    }
예제 #2
0
 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;
                 }
             }
         }
     }
 }