GameRoom.onState() method
listen to state events, this is fired whenever the client receives a state update from the server as defined by the tick rate
Signature:
onState(listener: (state: S) => void): () => void;Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
listener |
(state: S) => void |
() => void