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



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

Defined in: [src/index.ts:297](https://github.com/DRincs-Productions/pixi-vn/blob/4b8909bd13b1cc1fa7efb0238c44a5af3767e61f/src/index.ts#L297)

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]

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