option to update tile

# Conflicts:
#	front/src/Api/Events/ApiUpdateTileEvent.ts
#	front/src/Api/IframeListener.ts
#	front/src/Phaser/Game/GameScene.ts
This commit is contained in:
jonny 2021-05-10 00:27:21 +02:00
parent 79e530f0e6
commit ffe03d40f5
4 changed files with 227 additions and 163 deletions

View file

@ -0,0 +1,16 @@
import * as tg from "generic-type-guard";
export const updateTile = "updateTile"
export const isUpdateTileEvent =
new tg.IsInterface().withProperties({
x: tg.isNumber,
y: tg.isNumber,
tile: tg.isUnion(tg.isNumber, tg.isString),
layer: tg.isUnion(tg.isNumber, tg.isString)
}).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 UpdateTileEvent = tg.GuardedType<typeof isUpdateTileEvent>;