Propagating customized sprites all over the game
This commit is contained in:
parent
6d0bccc0e1
commit
84529d6e99
14 changed files with 99 additions and 73 deletions
|
@ -9,6 +9,6 @@ export interface ExSocketInterface extends Socket, Identificable {
|
|||
webRtcRoomId: string;
|
||||
userId: string;
|
||||
name: string;
|
||||
character: string;
|
||||
characterLayers: string[];
|
||||
position: PointInterface;
|
||||
}
|
||||
|
|
|
@ -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) {
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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) {
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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>;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue