> For the complete documentation index, see [llms.txt](https://gley.gitbook.io/mobile-pedestrian-system/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gley.gitbook.io/mobile-pedestrian-system/events/onstreetcrossing.md).

# OnStreetCrossing

### Description

Triggered every time a pedestrian is ready to cross the street at an intersection.

### Delegate

```csharp
public delegate void StreetCrossing(int pedestrianIndex, IIntersection intersection, int waypointIndex);
```

### Parameters

| Name                | Description                             |
| ------------------- | --------------------------------------- |
| **pedestrianIndex** | The index of the pedestrian.            |
| **intersection**    | The intersection component.             |
| **waypointIndex**   | The current waypoint of the pedestrian. |

### Example

Check **StopAtCrossing.cs** for a complete implementation example.
