Renaming changeTile
to setTiles
This commit is contained in:
parent
319db95bc8
commit
1e57028e6e
11 changed files with 85 additions and 85 deletions
|
@ -18,7 +18,7 @@ import type { PlaySoundEvent } from "./PlaySoundEvent";
|
|||
import type { MenuItemClickedEvent } from "./ui/MenuItemClickedEvent";
|
||||
import type { MenuItemRegisterEvent } from './ui/MenuItemRegisterEvent';
|
||||
import type { HasPlayerMovedEvent } from "./HasPlayerMovedEvent";
|
||||
import type { ChangeTileEvent } from "./ChangeTileEvent";
|
||||
import type { SetTilesEvent } from "./SetTilesEvent";
|
||||
|
||||
export interface TypedMessageEvent<T> extends MessageEvent {
|
||||
data: T
|
||||
|
@ -46,7 +46,7 @@ export type IframeEventMap = {
|
|||
loadSound: LoadSoundEvent
|
||||
playSound: PlaySoundEvent
|
||||
stopSound: null
|
||||
changeTile: ChangeTileEvent
|
||||
setTiles: SetTilesEvent
|
||||
getState: undefined,
|
||||
registerMenuCommand: MenuItemRegisterEvent
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import * as tg from "generic-type-guard";
|
||||
|
||||
export const isChangeTileEvent =
|
||||
export const isSetTilesEvent =
|
||||
tg.isArray(
|
||||
new tg.IsInterface().withProperties({
|
||||
x: tg.isNumber,
|
||||
|
@ -10,6 +10,6 @@ export const isChangeTileEvent =
|
|||
}).get()
|
||||
);
|
||||
/**
|
||||
* A message sent from the game to the iFrame when a user enters or leaves a zone marked with the "zone" property.
|
||||
* A message sent from the iFrame to the game to set one or many tiles.
|
||||
*/
|
||||
export type ChangeTileEvent = tg.GuardedType<typeof isChangeTileEvent>;
|
||||
export type SetTilesEvent = tg.GuardedType<typeof isSetTilesEvent>;
|
Loading…
Add table
Add a link
Reference in a new issue