implemented feedback
This commit is contained in:
parent
7c6b73efdb
commit
e5a196a42b
9 changed files with 31 additions and 35 deletions
|
@ -12,7 +12,7 @@ import {
|
|||
WebRtcSignalToServerMessage,
|
||||
PlayGlobalMessage,
|
||||
ReportPlayerMessage,
|
||||
QueryJitsiJwtMessage, SendUserMessage, ServerToClientMessage, Companion
|
||||
QueryJitsiJwtMessage, SendUserMessage, ServerToClientMessage, CompanionMessage
|
||||
} from "../Messages/generated/messages_pb";
|
||||
import {UserMovesMessage} from "../Messages/generated/messages_pb";
|
||||
import {TemplatedApp} from "uWebSockets.js"
|
||||
|
@ -139,10 +139,10 @@ export class IoSocketController {
|
|||
const right = Number(query.right);
|
||||
const name = query.name;
|
||||
|
||||
let companion: Companion|undefined = undefined;
|
||||
let companion: CompanionMessage|undefined = undefined;
|
||||
|
||||
if (typeof query.companion === 'string') {
|
||||
companion = new Companion();
|
||||
companion = new CompanionMessage();
|
||||
companion.setName(query.companion);
|
||||
}
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ import {Identificable} from "./Identificable";
|
|||
import {ViewportInterface} from "_Model/Websocket/ViewportMessage";
|
||||
import {
|
||||
BatchMessage,
|
||||
Companion,
|
||||
CompanionMessage,
|
||||
PusherToBackMessage,
|
||||
ServerToClientMessage,
|
||||
SubMessage
|
||||
|
@ -30,7 +30,7 @@ export interface ExSocketInterface extends WebSocket, Identificable {
|
|||
characterLayers: CharacterLayer[];
|
||||
position: PointInterface;
|
||||
viewport: ViewportInterface;
|
||||
companion?: Companion;
|
||||
companion?: CompanionMessage;
|
||||
/**
|
||||
* Pushes an event that will be sent in the next batch of events
|
||||
*/
|
||||
|
|
|
@ -6,7 +6,7 @@ import {
|
|||
PointMessage, PositionMessage, UserJoinedMessage,
|
||||
UserJoinedZoneMessage, UserLeftZoneMessage, UserMovedMessage,
|
||||
ZoneMessage,
|
||||
Companion
|
||||
CompanionMessage
|
||||
} from "../Messages/generated/messages_pb";
|
||||
import * as messages_pb from "../Messages/generated/messages_pb";
|
||||
import {ClientReadableStream} from "grpc";
|
||||
|
@ -31,7 +31,7 @@ export type MovesCallback = (thing: Movable, position: PositionInterface, listen
|
|||
export type LeavesCallback = (thing: Movable, listener: User) => void;*/
|
||||
|
||||
export class UserDescriptor {
|
||||
private constructor(public readonly userId: number, private name: string, private characterLayers: CharacterLayerMessage[], private position: PositionMessage, private companion?: Companion) {
|
||||
private constructor(public readonly userId: number, private name: string, private characterLayers: CharacterLayerMessage[], private position: PositionMessage, private companion?: CompanionMessage) {
|
||||
if (!Number.isInteger(this.userId)) {
|
||||
throw new Error('UserDescriptor.userId is not an integer: '+this.userId);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue