Gameplay Service

public sealed class GameplayService : StateService<GameplayState>, IInitSystem

The core game class, which controls match state. It is something like a Mediator between game processes. It can help you implement your own features.

To access it from your own scripts, inject it into your class using DI:

[Inject] GameplayService gameplay;

Instance fields

Type

Field name

Description

GameSettings

GameSettings

Currently loaded game GameSettings. It can be very useful for your code.

Events

Type

Event name

Description

Action

MatchStarted

Called when the match starts (all players loaded, etc).

Action<int>

MatchFinished

Triggered when the match is finished by one team winning. The winning team’s id is passed as the event argument.