Beispiel #1
0
        private void Awake()
        {
            m_DifficultyCurve = GameManager.inst.GetComponentInChildren <IDifficultyCurve>();

            InitialiseContainer();
            ConfigurePlayer();


            for (float t = m_FirstObstaclePosition;
                 t <= m_FirstObstaclePosition + m_InitialRange + m_MaxDistanceBetweenObstacles;
                 t += CalculateDistanceToNext())
            {
                CreateObstacle(t);
                m_NextObstacle = t;
            }
            m_DistanceToNextObstacle = CalculateDistanceToNext();
            m_NextObstacle          += m_DistanceToNextObstacle;
            m_LastPlayerZ            = m_Player.position.z;
        }
Beispiel #2
0
 private void Awake()
 {
     inst         = this;
     m_Difficulty = GetComponentInChildren <IDifficultyCurve>();
 }