107 Light->SetLightState(NewState);
111 Light->SetTrafficLightState(NewState);
166 if(LightState.State ==
State)
168 LightState.Time = NewTime;
177 if(LightState.State ==
State)
179 return LightState.Time;
Class which implements the state changing of traffic lights
A view over an actor and its properties.
float GetStateTime(const ETrafficLightState State) const
void SetGreenTime(float NewTime)
void RemoveCarlaActorTrafficLight(FCarlaActor *CarlaActor)
const FString & GetControllerId() const
void SetTrafficLightsState(ETrafficLightState NewState)
void SetGroup(ATrafficLightGroup *Group)
float GetYellowTime() const
TArray< UTrafficLightComponent * > TrafficLights
bool AdvanceTimeAndCycleFinished(float DeltaTime)
TArray< FTrafficLightStage > LightStates
void SetCurrentLightState(ETrafficLightState NewState)
UTrafficLightController()
float GetGreenTime() const
void SetYellowTime(float NewTime)
const FTrafficLightStage & GetCurrentState() const
void SetRedTime(float NewTime)
void AddCarlaActorTrafficLight(FCarlaActor *CarlaActor)
const TArray< UTrafficLightComponent * > & GetTrafficLights()
void SetElapsedTime(float InElapsedTime)
bool IsCycleFinished() const
void SetControllerId(const FString &Id)
TArray< FCarlaActor * > TrafficLightCarlaActors
void SetSequence(int InSequence)
ATrafficLightGroup * TrafficLightGroup
void AddTrafficLight(UTrafficLightComponent *TrafficLight)
ATrafficLightGroup * GetGroup()
void EmptyTrafficLights()
void RemoveTrafficLight(UTrafficLightComponent *TrafficLight)
void SetStates(TArray< FTrafficLightStage > States)
void SetStateTime(const ETrafficLightState State, float NewTime)
float GetElapsedTime() const
Defines a stage of a semaphor with a State and the time this state lasts