Skip to content

Latest commit

 

History

History
78 lines (40 loc) · 1.99 KB

README.md

File metadata and controls

78 lines (40 loc) · 1.99 KB

RxJS Observable API

RxJS Observables provides a powerful interface for subscribing to real-time events. Here is the list of observables that are exposed by slp-realtime.

Events

Game

realtime.game.start$

Emitted when a game starts.

Returns an Observable<GameStartType>

realtime.game.end$

Emitted when a game ends.

Returns an Observable<GameEndPayload>

Stock

realtime.stock.playerSpawn$

Emitted when a player spawns.

Returns an Observable<StockType>

realtime.stock.playerDied$

Emitted when a player dies.

Returns an Observable<StockType>

realtime.stock.percentChange$

Emitted when a player's percent changes.

Returns an Observable<PercentChange>

realtime.stock.countChange$

Emitted when the number of stocks a player has changes.

Returns an Observable<StockCountChange>

Combo

realtime.combo.start$

Emitted when a combo starts.

Returns an Observable<ComboEventPayload>

realtime.combo.extend$

Emitted for each additional hit that lands during a combo.

Returns an Observable<ComboEventPayload>

realtime.combo.end$

Emitted when a combo ends.

Returns an Observable<ComboEventPayload>

realtime.combo.conversion$

Emitted when a conversion occurs.

Returns an Observable<ComboEventPayload>

Input

realtime.input.playerIndexButtonCombo

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.