Extracted speed property

This commit is contained in:
Maximilian Giller 2023-05-29 00:22:36 +02:00
parent 04d16e4ac4
commit 7b1a357998
2 changed files with 3 additions and 1 deletions

View file

@ -22,7 +22,7 @@ void Player::update()
}
auto moveDirection = input->direction.asIsometricVector();
auto moveDelta = moveDirection * 30.0f * FRAME_TIME.asSeconds();
auto moveDelta = moveDirection * speed * FRAME_TIME.asSeconds();
coordinates.move(moveDelta);
circle->coordinates.set(coordinates);
}

View file

@ -22,6 +22,8 @@ public:
TrackableState getTrackableState() const override;
float speed = 30.0f;
private:
CircleObject *circle;
std::shared_ptr<InputIdentity> input;