diff options
| author | Elizabeth Hunt <elizabeth@simponic.xyz> | 2024-09-02 20:10:35 -0700 |
|---|---|---|
| committer | Elizabeth Hunt <elizabeth@simponic.xyz> | 2024-09-02 20:10:35 -0700 |
| commit | d35ab6cc851d3fc85f55cfb5676f8dc3552fab24 (patch) | |
| tree | bef9784e90e2e8f8f5b9e05300238747b775e618 /static/src/event.ts | |
| parent | a0a2068b66204d7d06eb3c3b4aa61b28469121f6 (diff) | |
| download | kennel.hatecomputers.club-d35ab6cc851d3fc85f55cfb5676f8dc3552fab24.tar.gz kennel.hatecomputers.club-d35ab6cc851d3fc85f55cfb5676f8dc3552fab24.zip | |
a bit more progress
Diffstat (limited to 'static/src/event.ts')
| -rw-r--r-- | static/src/event.ts | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/static/src/event.ts b/static/src/event.ts deleted file mode 100644 index cd50122..0000000 --- a/static/src/event.ts +++ /dev/null @@ -1,28 +0,0 @@ -export enum EventType { - INITIAL_STATE = "INITIAL_STATE", - SET_CONTROLLABLE = "SET_CONTROLLABLE", - ENTITY_BORN = "ENTITY_BORN", - ENTITY_DEATH = "ENTITY_DEATH", - ENTITY_POSITION_UPDATE = "ENTITY_POSITION_UPDATE", -} - -export interface Event { - event_type: EventType; - data: any; -} - -export interface InitialStateEvent extends Event { - event_type: EventType.INITIAL_STATE; - data: { - world: { width: number; height: number }; - entities: any[]; - }; -} - -export interface SetControllableEvent extends Event { - event_type: EventType.SET_CONTROLLABLE; - data: { - id: string; - client_id: string; - }; -} |
