# Function: onEnd() (/jsdoc/pixi-vn/index/namespaces/Game/functions/onEnd)



\> **onEnd**(`value`): `void`

Defined in: [src/index.ts:308](https://github.com/DRincs-Productions/pixi-vn/blob/998c1a75c5978f24c0dc137af5f42b90b2803967/src/index.ts#L308)

Function to be executed at the end of the game. It should be set in the game initialization.

Parameters [#parameters]

value [#value]

[`StepLabelType`](/jsdoc/pixi-vn/index/type-aliases/StepLabelType)

Returns [#returns]

`void`

Example [#example]

```typescript
Game.onEnd(async (props) => {
   props.navigate("/end")
})
```
