default: {
getPlayer(user?: GetPlayerDataReq): null | GetPlayerDataRes;
onEnterScene(cb: ((player: GetPlayerDataRes) => void)): void;
onLeaveScene(cb: ((userId: string) => void)): void;
} = ...
Type declaration
-
getPlayer:function
- getPlayer(user?: GetPlayerDataReq): null | GetPlayerDataRes
-
Parameters
-
Optional
user: GetPlayerDataReq
Returns null | GetPlayerDataRes
-
onEnterScene:function
- onEnterScene(cb: ((player: GetPlayerDataRes) => void)): void
-
Parameters
-
cb: ((player: GetPlayerDataRes) => void)
-
- (player: GetPlayerDataRes): void
-
Returns void
Returns void
-
onLeaveScene:function
- onLeaveScene(cb: ((userId: string) => void)): void
-
Parameters
-
cb: ((userId: string) => void)
-
- (userId: string): void
-
Returns void
Returns void
Returns the info of the player if it's in the scene.