refactor(player): clean code => Lightweight

This commit is contained in:
2024-01-09 14:15:17 +01:00
parent 9b0a7a78bb
commit 8d542b6484
6 changed files with 33 additions and 31 deletions
+2 -2
View File
@@ -12,8 +12,8 @@ void Inputs::HandleInputs() {
if (Keyboard::isKeyPressed(Keyboard::Space)) {
if (_clock.getElapsedTime().asMilliseconds() > 500) {
const Vector2f playerPos = _player.PlayerShape.getPosition();
const float playerRadius = _player.PlayerShape.getRadius();
const Vector2f playerPos = _player.getShape().getPosition();
const float playerRadius = _player.getShape().getRadius();
Laser laser;
laser.setInitialPosition(Vector2f(playerPos.x + playerRadius, playerPos.y - playerRadius));