Skip to content

Commit

Permalink
fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
swagween committed Feb 20, 2024
1 parent ba0eb54 commit 69c1e01
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 4 additions & 2 deletions DogTales/dog/dogtales.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@ void DogTales::tick() {
if (ImGui::BeginTabItem("Player")) {
bave::im_text("Controller States");
ImGui::Separator();
bave::im_text("move_x (Press A/D or Left/Right): {:.2f}", m_player.get_controller_state("move_x").value());
bave::im_text("move_y (Press W/S or Up/Down): {:.2f}", m_player.get_controller_state("move_y").value());
bave::im_text("move_x (Press A/D or Left/Right): {:.2f}",
m_player.get_controller_state("move_x").value());
bave::im_text("move_y (Press W/S or Up/Down): {:.2f}",
m_player.get_controller_state("move_y").value());
bave::im_text("Jump (Press 'E'): {:.2f}", m_player.get_controller_state("jump").value());
ImGui::EndTabItem();
}
Expand Down
4 changes: 3 additions & 1 deletion DogTales/dog/player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ void Player::tick(bave::Seconds const dt) {

void Player::draw(bave::Shader& shader) const { m_sprite.draw(shader); }

std::optional<float> Player::get_controller_state(std::string_view key) const { return m_player_controller.get_controller_state(key); }
std::optional<float> Player::get_controller_state(std::string_view key) const {
return m_player_controller.get_controller_state(key);
}

void Player::handle_wall_collision() {
auto& position = m_physics.position;
Expand Down

0 comments on commit 69c1e01

Please sign in to comment.