game state can be read out by the client APIs
# Conflicts: # front/src/Api/IframeListener.ts # front/src/Phaser/Game/GameScene.ts # front/src/iframe_api.ts
This commit is contained in:
parent
5dc2f0ac47
commit
3836d5037c
5 changed files with 74 additions and 0 deletions
11
front/src/Api/Events/ApiGameStateEvent.ts
Normal file
11
front/src/Api/Events/ApiGameStateEvent.ts
Normal file
|
@ -0,0 +1,11 @@
|
|||
import * as tg from "generic-type-guard";
|
||||
|
||||
export const isGameStateEvent =
|
||||
new tg.IsInterface().withProperties({
|
||||
roomId: tg.isString,
|
||||
data:tg.isObject
|
||||
}).get();
|
||||
/**
|
||||
* A message sent from the game to the iFrame when a user enters or leaves a zone marked with the "zone" property.
|
||||
*/
|
||||
export type GameStateEvent = tg.GuardedType<typeof isGameStateEvent>;
|
Loading…
Add table
Add a link
Reference in a new issue