Propagating customized sprites all over the game

This commit is contained in:
David Négrier 2020-07-28 17:43:33 +02:00
parent 6d0bccc0e1
commit 84529d6e99
14 changed files with 99 additions and 73 deletions

View file

@ -9,6 +9,6 @@ export interface ExSocketInterface extends Socket, Identificable {
webRtcRoomId: string;
userId: string;
name: string;
character: string;
characterLayers: string[];
position: PointInterface;
}

View file

@ -1,6 +1,6 @@
import {PointInterface} from "_Model/Websocket/PointInterface";
export class MessageUserJoined {
constructor(public userId: string, public name: string, public character: string, public position: PointInterface) {
constructor(public userId: string, public name: string, public characterLayers: string[], public position: PointInterface) {
}
}

View file

@ -6,6 +6,6 @@ export class Point implements PointInterface{
}
export class MessageUserPosition {
constructor(public userId: string, public name: string, public character: string, public position: PointInterface) {
constructor(public userId: string, public name: string, public characterLayers: string[], public position: PointInterface) {
}
}

View file

@ -3,6 +3,6 @@ import * as tg from "generic-type-guard";
export const isSetPlayerDetailsMessage =
new tg.IsInterface().withProperties({
name: tg.isString,
character: tg.isString
characterLayers: tg.isArray(tg.isString)
}).get();
export type SetPlayerDetailsMessage = tg.GuardedType<typeof isSetPlayerDetailsMessage>;