Exemple #1
0
    ////////////////////////////////////////////////////////////////

    void ResetResetPlants(LevelID levelID)
    {
        for (int i = 0; i < m_ResetPlantSpawners.Count; i++)
        {
            m_ResetPlantSpawners[i].ResetSpawnTimer();
        }

        for (int i = 0; i < m_ResetPlantData.Count; i++)
        {
            ResetPlantData resetPlantData = m_ResetPlantData[i];

            if (resetPlantData._ResetPlant._LevelID != levelID)
            {
                continue;
            }

            if (!resetPlantData._Respawns)
            {
                // #destroySpawnedResetPlant
                GameObject.Destroy(resetPlantData._ResetPlant.gameObject);
                m_ResetPlantData.RemoveAt(i);
                i--;
                continue;
            }

            // Reset Timers
            resetPlantData._PloppedTimer = new GameTicks(0);
            resetPlantData._ResetPlant.TransitionToState(ResetPlantState.Default, false);
        }
    }