From 92c23424a36531796b55a87458ae5fc5320ad227 Mon Sep 17 00:00:00 2001 From: cha0s Date: Tue, 21 May 2019 03:09:06 -0500 Subject: [PATCH] feat: addChildren --- packages/state/synchronizer.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/state/synchronizer.js b/packages/state/synchronizer.js index 4416c35..18d05df 100644 --- a/packages/state/synchronizer.js +++ b/packages/state/synchronizer.js @@ -13,6 +13,11 @@ export class Synchronizer { } } + addChild(child) { + this.children.push(child); + this.childrenPacketsForUpdate.push(child.packetsForUpdate.bind(child)); + } + packetsForUpdate(force = false) { const packetsForUpdate = []; for (let i = 0; i < this.childrenPacketsForUpdate.length; i++) {