diff options
author | heavydemon21 <nielsstunnebrink1@gmail.com> | 2025-01-10 19:51:02 +0100 |
---|---|---|
committer | heavydemon21 <nielsstunnebrink1@gmail.com> | 2025-01-10 19:51:02 +0100 |
commit | 16917357837916d1ef88b6122218fa0d567d1ddc (patch) | |
tree | eefa561b81c48549277950692fdad714a2f501f2 /game/enemy/EnemyBulletScript.cpp | |
parent | 0b19fe5a9168368d4be0993407dd3fc3bdfa0611 (diff) | |
parent | b9d00961a8894356c7cff7597de424a12d2841a6 (diff) |
Merge remote-tracking branch 'origin/master' into niels/game
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) { |