@@ -188,8 +188,10 @@ public void set_position(KBEngine.Entity entity)
188188 if ( entity . renderObj == null )
189189 return ;
190190
191- ( ( UnityEngine . GameObject ) entity . renderObj ) . GetComponent < GameEntity > ( ) . destPosition = entity . position ;
192- ( ( UnityEngine . GameObject ) entity . renderObj ) . GetComponent < GameEntity > ( ) . position = entity . position ;
191+ GameEntity gameEntity = ( ( UnityEngine . GameObject ) entity . renderObj ) . GetComponent < GameEntity > ( ) ;
192+ gameEntity . destPosition = entity . position ;
193+ gameEntity . position = entity . position ;
194+ gameEntity . spaceID = KBEngineApp . app . spaceID ;
193195 }
194196
195197 public void updatePosition ( KBEngine . Entity entity )
@@ -200,6 +202,7 @@ public void updatePosition(KBEngine.Entity entity)
200202 GameEntity gameEntity = ( ( UnityEngine . GameObject ) entity . renderObj ) . GetComponent < GameEntity > ( ) ;
201203 gameEntity . destPosition = entity . position ;
202204 gameEntity . isOnGround = entity . isOnGround ;
205+ gameEntity . spaceID = KBEngineApp . app . spaceID ;
203206 }
204207
205208 public void onControlled ( KBEngine . Entity entity , bool isControlled )
@@ -216,8 +219,9 @@ public void set_direction(KBEngine.Entity entity)
216219 if ( entity . renderObj == null )
217220 return ;
218221
219- ( ( UnityEngine . GameObject ) entity . renderObj ) . GetComponent < GameEntity > ( ) . destDirection =
220- new Vector3 ( entity . direction . y , entity . direction . z , entity . direction . x ) ;
222+ GameEntity gameEntity = ( ( UnityEngine . GameObject ) entity . renderObj ) . GetComponent < GameEntity > ( ) ;
223+ gameEntity . destDirection = new Vector3 ( entity . direction . y , entity . direction . z , entity . direction . x ) ;
224+ gameEntity . spaceID = KBEngineApp . app . spaceID ;
221225 }
222226
223227 public void set_HP ( KBEngine . Entity entity , object v )
0 commit comments