Adding batched messages + the notion of notifier / zones (not plugged in the system yet)
This commit is contained in:
parent
1879c550c4
commit
9b702c75e3
13 changed files with 518 additions and 22 deletions
|
@ -677,7 +677,13 @@ export class GameScene extends Phaser.Scene implements CenterListener {
|
|||
private doPushPlayerPosition(event: HasMovedEvent): void {
|
||||
this.lastMoveEventSent = event;
|
||||
this.lastSentTick = this.currentTick;
|
||||
this.connection.sharePosition(event.x, event.y, event.direction, event.moving);
|
||||
const camera = this.cameras.main;
|
||||
this.connection.sharePosition(event.x, event.y, event.direction, event.moving, {
|
||||
left: camera.scrollX,
|
||||
top: camera.scrollY,
|
||||
right: camera.scrollX + camera.width,
|
||||
bottom: camera.scrollY + camera.height,
|
||||
});
|
||||
}
|
||||
|
||||
EventToClickOnTile(){
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue