RxJS Observables provides a powerful interface for subscribing to real-time events.
Here is the list of observables that are exposed by slp-realtime
.
Emitted when a game starts.
Returns an Observable<
GameStartType
>
Emitted when a game ends.
Returns an Observable<
GameEndPayload
>
Emitted when a player spawns.
Returns an Observable<
StockType
>
Emitted when a player dies.
Returns an Observable<
StockType
>
Emitted when a player's percent changes.
Returns an Observable<
PercentChange
>
Emitted when the number of stocks a player has changes.
Returns an Observable<
StockCountChange
>
Emitted when a combo starts.
Returns an Observable<
ComboEventPayload
>
Emitted for each additional hit that lands during a combo.
Returns an Observable<
ComboEventPayload
>
Emitted when a combo ends.
Returns an Observable<
ComboEventPayload
>
Emitted when a conversion occurs.
Returns an Observable<
ComboEventPayload
>
A function which takes in (playerIndex: number, buttons: string[], duration: number = 1)
and returns an Observable<
InputButtonCombo
>
which emits when the buttons in buttons
are held by player playerIndex
for duration
frames.