diff options
author | Max-001 <maxsmits21@kpnmail.nl> | 2025-01-10 17:07:28 +0100 |
---|---|---|
committer | Max-001 <maxsmits21@kpnmail.nl> | 2025-01-10 17:07:28 +0100 |
commit | 912774706bab1e7817facb3cff12e961a89d1980 (patch) | |
tree | 0896b12c29dccc247c69e54daaa32d8ce3097ed0 /game/enemy/EnemyBulletScript.cpp | |
parent | 90a33d36c34b1512270a6724564995dd8bf914a6 (diff) | |
parent | 7aa07561a52016007ff852acefa4db68260f0f1e (diff) |
Merge remote-tracking branch 'origin/wouter/game-improvements' into max/game2
Diffstat (limited to 'game/enemy/EnemyBulletScript.cpp')
-rw-r--r-- | game/enemy/EnemyBulletScript.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/game/enemy/EnemyBulletScript.cpp b/game/enemy/EnemyBulletScript.cpp index 65c0c23..d208a88 100644 --- a/game/enemy/EnemyBulletScript.cpp +++ b/game/enemy/EnemyBulletScript.cpp @@ -18,7 +18,7 @@ void EnemyBulletScript::fixed_update(crepe::duration_t dt) { Transform & cam_transform = this->get_components_by_name<Transform>("camera").front(); Rigidbody & bullet_body = this->get_component<Rigidbody>(); //move - transform.position.x += bullet_body.data.linear_velocity.x * dt.count(); + transform.position += bullet_body.data.linear_velocity * dt.count(); vec2 half_screen = camera.viewport_size / 2; float despawn_location = cam_transform.position.x - half_screen.x - 50; if (transform.position.x < despawn_location) { |