예제 #1
0
    private void CheckPlayerProgress()
    {
        if (player.transform.position.y / obstacles.interval > (m_Progress + 1))
        {
            m_Progress++;
            obstacles.AddObstacles(m_Progress);
        }

        if (m_Progress > 0 && m_Progress % pickupDropRate == 0)
        {
            if (!m_DidDropPickup)
            {
                m_DidDropPickup = true;
                obstacles.AddPickups(m_Progress);
            }
            else
            {
                m_DidDropPickup = false;
            }
        }
    }