Traffic Lights Behaviour

Description

Controls the behavior of the lights inside a traffic light intersection.

Declaration

 public delegate void TrafficLightsBehaviour(TrafficLightsColor currentRoadColor, List<GameObject> redLightObjects, List<GameObject> yellowLightObjects, List<GameObject> greenLightObjects, string name);

Parameters

Name
Description

currentRoadColor

The current color that is on this road specified by the Traffic System .

redLightObjects

The list of the red lights objects assigned in editor.

yellowLightObjects

The list of the yellow lights objects assigned in editor.

greenLightObjects

The list of the green lights objects assigned in editor.

name

The name of the intersection.

Set Method

public static void SetTrafficLightsBehaviour(TrafficLightsBehaviour trafficLightsBehaviourDelegate)

Example

circle-info

Default delegate implementation can be found inside DefaultDelegates.cs

Last updated