diff options
author | WBoerenkamps <wrj.boerenkamps@student.avans.nl> | 2025-01-09 14:54:40 +0100 |
---|---|---|
committer | WBoerenkamps <wrj.boerenkamps@student.avans.nl> | 2025-01-09 14:54:40 +0100 |
commit | 843d27e8f68bf3d3d39baedb7a5c53154160afd7 (patch) | |
tree | 535bbd6accd3bbafeead9fb5d462c11515dce7d6 | |
parent | 8bd94b7a0a1eb7c2f6ca003fac95bea858671218 (diff) |
fixed some player features
-rw-r--r-- | game/player/PlayerScript.cpp | 1 | ||||
-rw-r--r-- | game/player/PlayerSubScene.cpp | 4 |
2 files changed, 2 insertions, 3 deletions
diff --git a/game/player/PlayerScript.cpp b/game/player/PlayerScript.cpp index 1283d0a..fadca9c 100644 --- a/game/player/PlayerScript.cpp +++ b/game/player/PlayerScript.cpp @@ -104,7 +104,6 @@ void PlayerScript::fixed_update(crepe::duration_t dt) { last_fired = now; } } - if (this->get_key_state(Keycode::SPACE)) { rb.add_force_linear(vec2(0, -PLAYER_GRAVITY_SCALE / 2.5) * dt.count() / 0.02); if (prev_anim != 1) { diff --git a/game/player/PlayerSubScene.cpp b/game/player/PlayerSubScene.cpp index 245f19c..dfcd763 100644 --- a/game/player/PlayerSubScene.cpp +++ b/game/player/PlayerSubScene.cpp @@ -22,7 +22,7 @@ using namespace crepe; using namespace std; PlayerSubScene::PlayerSubScene(Scene & scn) { - GameObject player = scn.new_object("player", "player", vec2(200, 200)); + GameObject player = scn.new_object("player", "player", vec2(-100, 200)); Asset player_bullet {"asset/other_effects/effect_smgbullet.png"}; Sprite & player_bullet_sprite = player.add_component<Sprite>( @@ -106,7 +106,7 @@ PlayerSubScene::PlayerSubScene(Scene & scn) { .looping = true, } ); - player.add_component<BoxCollider>(vec2(35, 35)); + player.add_component<BoxCollider>(vec2(50, 35)); Asset player_head_asset {"asset/barry/defaultHead.png"}; Sprite & player_head_sprite = player.add_component<Sprite>( player_head_asset, |