diff options
author | Elizabeth Hunt <elizabeth.hunt@simponic.xyz> | 2023-08-21 17:22:23 -0600 |
---|---|---|
committer | Elizabeth Hunt <elizabeth.hunt@simponic.xyz> | 2023-08-21 17:22:23 -0600 |
commit | d64ffb5016119e54f0e20d05ae8ac9c96955d9d5 (patch) | |
tree | 11d47b519237b0266baa7208855bae19462a9abe /engine/systems/NetworkUpdate.ts | |
parent | b786fe1e723b7cf905cdd7e525375dfe96241a21 (diff) | |
download | jumpstorm-d64ffb5016119e54f0e20d05ae8ac9c96955d9d5.tar.gz jumpstorm-d64ffb5016119e54f0e20d05ae8ac9c96955d9d5.zip |
very basic server messages - need to figure shit out still
Diffstat (limited to 'engine/systems/NetworkUpdate.ts')
-rw-r--r-- | engine/systems/NetworkUpdate.ts | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/engine/systems/NetworkUpdate.ts b/engine/systems/NetworkUpdate.ts index 6f8acb9..cdd6de7 100644 --- a/engine/systems/NetworkUpdate.ts +++ b/engine/systems/NetworkUpdate.ts @@ -18,7 +18,7 @@ export class NetworkUpdate extends System { constructor( queueProvider: MessageQueueProvider, - publisher: MessagePublisher, + publisher: MessagePublisher ) { super(SystemNames.NetworkUpdate); @@ -28,15 +28,16 @@ export class NetworkUpdate extends System { public update(_dt: number, game: Game) { const messages = this.queueProvider.getNewMessages(); + if (messages.length) console.log(messages); this.queueProvider.clearMessages(); game.forEachEntityWithComponent( ComponentNames.NetworkUpdateable, (entity) => { const networkUpdateComponent = entity.getComponent<NetworkUpdateable>( - ComponentNames.NetworkUpdateable, + ComponentNames.NetworkUpdateable ); - }, + } ); } } |