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/EnemyBulletSubScene.cpp | |
parent | 90a33d36c34b1512270a6724564995dd8bf914a6 (diff) | |
parent | 7aa07561a52016007ff852acefa4db68260f0f1e (diff) |
Merge remote-tracking branch 'origin/wouter/game-improvements' into max/game2
Diffstat (limited to 'game/enemy/EnemyBulletSubScene.cpp')
-rw-r--r-- | game/enemy/EnemyBulletSubScene.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/game/enemy/EnemyBulletSubScene.cpp b/game/enemy/EnemyBulletSubScene.cpp index ad2ca9d..bc31ba8 100644 --- a/game/enemy/EnemyBulletSubScene.cpp +++ b/game/enemy/EnemyBulletSubScene.cpp @@ -16,6 +16,7 @@ #include "EnemyBulletScript.h" #include "EnemyBulletSubScene.h" #include "EnemyScript.h" +#include "api/Color.h" using namespace crepe; using namespace std; int EnemyBulletSubScene::create(Scene & scn, int counter) { @@ -27,19 +28,19 @@ int EnemyBulletSubScene::create(Scene & scn, int counter) { Rigidbody & bullet_body = bullet.add_component<Rigidbody>(Rigidbody::Data { .gravity_scale = 0, .body_type = Rigidbody::BodyType::KINEMATIC, - - .linear_velocity = vec2 {-250, 0}, + .linear_velocity = vec2 {-300, 0}, .kinematic_collision = false, .collision_layers = {COLL_LAY_MISSILE, COLL_LAY_ZAPPER}, .collision_layer = COLL_LAY_BULLET }); bullet_body.active = false; - BoxCollider & bullet_collider = bullet.add_component<BoxCollider>(vec2(60, 30)); + BoxCollider & bullet_collider = bullet.add_component<BoxCollider>(vec2(40, 10)); //bullet_collider.active = false; Asset bullet_asset {"asset/other_effects/effect_smgbullet_x2.png"}; Sprite & bullet_sprite = bullet.add_component<Sprite>( bullet_asset, Sprite::Data { + .color = Color::BLUE, .flip = {true, false}, .sorting_in_layer = SORT_IN_LAY_OBSTACLES, .order_in_layer = 1, |