summaryrefslogtreecommitdiff
path: root/client/src/events.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/events.ts')
-rw-r--r--client/src/events.ts25
1 files changed, 24 insertions, 1 deletions
diff --git a/client/src/events.ts b/client/src/events.ts
index 5a64d5b..cc001f7 100644
--- a/client/src/events.ts
+++ b/client/src/events.ts
@@ -6,7 +6,9 @@ import type { Direction } from './Direction';
export enum EventType {
HEART_BEAT = "HeartBeat",
PLAYER_REGISTRATION = "PlayerRegistrationEvent",
- START_MOVING = "StartMoving"
+ START_MOVING = "StartMoving",
+ STOP_MOVING = "StopMoving",
+ NEW_TILE_POS = "NewTilePos"
}
export interface AkkamonEvent {
@@ -26,10 +28,31 @@ export class StartMovingEvent implements AkkamonEvent {
public type: EventType = EventType.START_MOVING;
constructor(
+ public sceneId: string,
public direction: Direction,
) { }
}
+export class StopMovingEvent implements AkkamonEvent {
+
+ public type: EventType = EventType.STOP_MOVING;
+
+ constructor(
+ public sceneId: string,
+ public direction: Direction,
+ ) { }
+}
+
+export class NewTilePosEvent implements AkkamonEvent {
+
+ public type: EventType = EventType.NEW_TILE_POS;
+
+ constructor(
+ public sceneId: string,
+ public tilePos: {x: number, y: number}
+ ) { }
+}
+
export class HeartBeatReplyEvent implements AkkamonEvent {
public type: EventType = EventType.HEART_BEAT;