server reconciliation OK (a little rubberbanding)
This commit is contained in:
@@ -29,6 +29,7 @@ class EventGameUpdate extends ServerEvent {
|
||||
playerLeft = {y: 0};
|
||||
playerRight = {y: 0};
|
||||
ball = {x: 0, y: 0, speed: 0};
|
||||
lastInputId = 0;
|
||||
constructor() { // TODO: constructor that take GameComponentsServer maybe ?
|
||||
super(en.EventTypes.gameUpdate);
|
||||
}
|
||||
@@ -73,9 +74,11 @@ class ClientAnnounce extends ClientEvent {
|
||||
|
||||
class EventInput extends ClientEvent {
|
||||
input: en.InputEnum;
|
||||
constructor(input: en.InputEnum = 0) {
|
||||
inputId: number;
|
||||
constructor(input: en.InputEnum = 0, inputId: number = 0) {
|
||||
super(en.EventTypes.clientInput);
|
||||
this.input = input;
|
||||
this.inputId = inputId;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user