diff options
author | heavydemon21 <48092678+heavydemon21@users.noreply.github.com> | 2025-01-10 19:35:08 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-01-10 19:35:08 +0100 |
commit | b9d00961a8894356c7cff7597de424a12d2841a6 (patch) | |
tree | aa033307a742df0c22131482858749bcf480ba38 /game/enemy/EnemyBulletScript.cpp | |
parent | 20f6f8ddf013e5d18770bd0a01474a845843bdd7 (diff) | |
parent | f3413f3d0fbffee0cc363096cd873a8be766ad64 (diff) |
Merge pull request #123 from lonkaars/wouter/game-improvements
some extra features
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) { |