aboutsummaryrefslogtreecommitdiff
path: root/game/enemy/EnemyBulletScript.cpp
diff options
context:
space:
mode:
authorWBoerenkamps <wrj.boerenkamps@student.avans.nl>2025-01-09 14:46:30 +0100
committerWBoerenkamps <wrj.boerenkamps@student.avans.nl>2025-01-09 14:46:30 +0100
commit7739a80176cea889ce240d18d354c5174825b25a (patch)
treee61974e217791cd86f519bf1c4cfd3b082d55166 /game/enemy/EnemyBulletScript.cpp
parent8b32dbc33c434f84b4aab98819147c3b8416ff69 (diff)
workers during normal sequence working
Diffstat (limited to 'game/enemy/EnemyBulletScript.cpp')
-rw-r--r--game/enemy/EnemyBulletScript.cpp2
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) {