From 641acf3bd1c8a4f1ff4023ebcbaca01c5b40779e Mon Sep 17 00:00:00 2001 From: Gary Weiss Date: Thu, 25 May 2017 14:10:50 +0300 Subject: [PATCH] GameObject must syncTo as well --- src/serialize/GameObject.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/serialize/GameObject.js b/src/serialize/GameObject.js index 29d9170..d22a110 100644 --- a/src/serialize/GameObject.js +++ b/src/serialize/GameObject.js @@ -111,13 +111,12 @@ class GameObject extends Serializable { /** * synchronize this object to the state of an other object - * @param {GameObject} other + * @param {GameObject} other the other object to synchronize to */ syncTo(other) { - this.id = other.id; + super.syncTo(other); } - // copy physical attributes to physics sub-object refreshToPhysics() {}