Linting
This commit is contained in:
@@ -152,7 +152,7 @@ export class Connection implements Connection {
|
||||
* Messages inside batched messages are extracted and sent to listeners directly.
|
||||
*/
|
||||
this.socket.on(EventMessage.BATCH, (batchedMessagesBinary: ArrayBuffer) => {
|
||||
const batchMessage = BatchMessage.deserializeBinary(new Uint8Array(batchedMessagesBinary as ArrayBuffer));
|
||||
const batchMessage = BatchMessage.deserializeBinary(new Uint8Array(batchedMessagesBinary));
|
||||
|
||||
for (const message of batchMessage.getPayloadList()) {
|
||||
let event: string;
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import {PositionMessage} from "../../../messages/generated/messages_pb";
|
||||
import {PointInterface} from "../Connection";
|
||||
import Direction = PositionMessage.Direction;
|
||||
|
||||
export namespace ProtobufClientUtils {
|
||||
import Direction = PositionMessage.Direction;
|
||||
export class ProtobufClientUtils {
|
||||
|
||||
export function toPointInterface(position: PositionMessage): PointInterface {
|
||||
public static toPointInterface(position: PositionMessage): PointInterface {
|
||||
let direction: string;
|
||||
switch (position.getDirection()) {
|
||||
case Direction.UP:
|
||||
|
||||
@@ -42,7 +42,6 @@ import {ActionableItem} from "../Items/ActionableItem";
|
||||
import {UserInputManager} from "../UserInput/UserInputManager";
|
||||
import {UserMovedMessage} from "../../../../messages/generated/messages_pb";
|
||||
import {ProtobufClientUtils} from "../../Network/ProtobufClientUtils";
|
||||
import toPointInterface = ProtobufClientUtils.toPointInterface;
|
||||
|
||||
|
||||
export enum Textures {
|
||||
@@ -224,7 +223,7 @@ export class GameScene extends Phaser.Scene implements CenterListener {
|
||||
|
||||
const messageUserMoved: MessageUserMovedInterface = {
|
||||
userId: message.getUserid(),
|
||||
position: toPointInterface(position)
|
||||
position: ProtobufClientUtils.toPointInterface(position)
|
||||
}
|
||||
|
||||
this.updatePlayerPosition(messageUserMoved);
|
||||
|
||||
Reference in New Issue
Block a user