private void OnEntityRotationChanged(object sender, Atom.ChangedValue <float> e) { if (this.body == null) { return; } if (this.body.Rotation != e.NewValue) { this.body.Rotation = e.NewValue; } }
private void OnEntityPositionChanged(object sender, Atom.ChangedValue <Vector2> e) { if (this.body == null) { return; } var physicsPosition = this.body.Position; var entityPosition = e.NewValue; if (physicsPosition.X != entityPosition.X || physicsPosition.Y != entityPosition.Y) { this.body.Position = entityPosition.ToXna(); } }