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:
parent
79e530f0e6
commit
ffe03d40f5
4 changed files with 227 additions and 163 deletions
16
front/src/Api/Events/ApiUpdateTileEvent.ts
Normal file
16
front/src/Api/Events/ApiUpdateTileEvent.ts
Normal 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>;
|
Loading…
Add table
Add a link
Reference in a new issue