// Update is called once per frame void Update() { m_spawnTimer.Update(Time.deltaTime); if (m_spawnTimer.IsTimeOver()) { SpecialPlayMap specialPlayMap = Instantiate(m_specialMap).GetComponent <SpecialPlayMap>(); specialPlayMap.Init(m_start, m_end); m_spawnTimer.Reset(); } }
/// <summary> /// 更新 /// </summary> void Update() { m_timerActive.Update(Time.deltaTime); if (m_timerActive.IsTimeOver()) { int indexSpawnPoint = Random.Range(0, m_spawnPoints.Count); int indexObjectPole = Random.Range(0, m_objectPoles.Count); if (m_poles[indexSpawnPoint] == null) { m_poles[indexSpawnPoint] = (GameObject)Instantiate(m_objectPoles[indexObjectPole], m_spawnPoints[indexSpawnPoint].position, Quaternion.identity); m_poles[indexSpawnPoint].transform.SetParent(transform); } m_timerActive.Reset(); } }