refactor: used setValues to avoid creating object

pull/313/head
alestiago 3 years ago
parent 177a3dafcc
commit ce23ea7f2c

@ -16,8 +16,9 @@ class BallScalingBehavior extends Component with ParentIsA<Ball> {
parent.body.fixtures.first.shape.radius = (Ball.size.x / 2) * scaleFactor;
parent.firstChild<SpriteComponent>()!.scale.setFrom(
Vector2.all(scaleFactor),
parent.firstChild<SpriteComponent>()!.scale.setValues(
scaleFactor,
scaleFactor,
);
}
}

Loading…
Cancel
Save