Esempio n. 1
0
    private void AnimWait()
    {
        m_timerWait.Update(Time.deltaTime);

        if (m_timerWait.IsTimeOver())
        {
            m_animStep = AnimStep.ANIM_DOWN;
            m_timerWait.Reset();
        }
    }
    // 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();
        }
    }
Esempio n. 3
0
    /// <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();
        }
    }