// METHOD: LightController //-------------------------------------------------------------------------------------- /// <summary> /// Control the train lights /// </summary> //-------------------------------------------------------------------------------------- private void LightController() { // If the train is not in a tunnel and the track m_signal indicates a tunnel, turn the lights on if (!m_inTunnel && m_currentBlock.HasTunnel) { m_myTrain.SetLights(TrainState.Light.High); m_inTunnel = true; } // If the train is in a tunnel and the track m_signal indicates no tunnel, turn the lights off else if (m_inTunnel && !m_currentBlock.HasTunnel) { m_myTrain.SetLights(TrainState.Light.Off); m_inTunnel = false; } }