Wip reworking server handleInput
+ fixedDeltaTime for server
This commit is contained in:
@@ -2,13 +2,17 @@
|
||||
import { WebSocket } from "../wsServer.js";
|
||||
import { Racket } from "../../shared_js/class/Rectangle.js";
|
||||
import { GameSession } from "./GameSession.js";
|
||||
import * as ev from "../../shared_js/class/Event.js"
|
||||
|
||||
class Client {
|
||||
socket: WebSocket;
|
||||
id: string; // Pas indispensable si "socket" a une copie de "id"
|
||||
lastInputId: number = 0;
|
||||
isAlive: boolean = true;
|
||||
gameSession: GameSession;
|
||||
|
||||
inputArr: ev.EventInput[] = [];
|
||||
lastInputId: number = 0;
|
||||
|
||||
constructor(socket: WebSocket, id: string) {
|
||||
this.socket = socket;
|
||||
this.id = id;
|
||||
|
||||
Reference in New Issue
Block a user