private void RebuildTrack()
 {
     m_streetView.ToggleAppearance(false, () => {
         m_splineManager.GenerateTrackFromTrackData();
         m_streetView.ToggleAppearance(true, null);
     });
 }
Esempio n. 2
0
 private void UpdateTrackMesh()
 {
     m_streetView.ToggleAppearance(false, () =>
     {
         m_splineManager.GenerateTrack();
         m_streetView.ToggleAppearance(true, null);
     });
 }
Esempio n. 3
0
    public override void EnterState()
    {
        Debug.Log("Entered RaceSetupState");
        base.EnterState();

        // Rebuild track once more before the race
        m_streetView.ToggleAppearance(false, () =>
        {
            m_splineMgr.GenerateTrackFromTrackData();
            m_vehicleManager.SpawnVehicleAtStart();
            m_streetView.ToggleAppearance(true, null);
        });

        // Reset the speed value;
        m_input.SetValue(0f);
    }