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/EnemyBulletSubScene.cpp | |
parent | 0b19fe5a9168368d4be0993407dd3fc3bdfa0611 (diff) | |
parent | b9d00961a8894356c7cff7597de424a12d2841a6 (diff) |
Merge remote-tracking branch 'origin/master' into niels/game
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, |