@@ -188,8 +188,10 @@ public void set_position(KBEngine.Entity entity)
188
188
if ( entity . renderObj == null )
189
189
return ;
190
190
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 ;
193
195
}
194
196
195
197
public void updatePosition ( KBEngine . Entity entity )
@@ -200,6 +202,7 @@ public void updatePosition(KBEngine.Entity entity)
200
202
GameEntity gameEntity = ( ( UnityEngine . GameObject ) entity . renderObj ) . GetComponent < GameEntity > ( ) ;
201
203
gameEntity . destPosition = entity . position ;
202
204
gameEntity . isOnGround = entity . isOnGround ;
205
+ gameEntity . spaceID = KBEngineApp . app . spaceID ;
203
206
}
204
207
205
208
public void onControlled ( KBEngine . Entity entity , bool isControlled )
@@ -216,8 +219,9 @@ public void set_direction(KBEngine.Entity entity)
216
219
if ( entity . renderObj == null )
217
220
return ;
218
221
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 ;
221
225
}
222
226
223
227
public void set_HP ( KBEngine . Entity entity , object v )
0 commit comments