From bb976ed881a989b8b2cec90c905d906d9b652a9d Mon Sep 17 00:00:00 2001 From: Loek Le Blansch Date: Wed, 8 Jan 2025 16:20:10 +0100 Subject: `make format` --- game/enemy/EnemyBulletSubScene.cpp | 2 +- game/enemy/EnemyScript.cpp | 7 +++---- game/enemy/EnemySubScene.cpp | 5 ++--- 3 files changed, 6 insertions(+), 8 deletions(-) (limited to 'game/enemy') diff --git a/game/enemy/EnemyBulletSubScene.cpp b/game/enemy/EnemyBulletSubScene.cpp index 5c31f1d..ad2ca9d 100644 --- a/game/enemy/EnemyBulletSubScene.cpp +++ b/game/enemy/EnemyBulletSubScene.cpp @@ -30,7 +30,7 @@ int EnemyBulletSubScene::create(Scene & scn, int counter) { .linear_velocity = vec2 {-250, 0}, .kinematic_collision = false, - .collision_layers = {COLL_LAY_MISSILE,COLL_LAY_ZAPPER}, + .collision_layers = {COLL_LAY_MISSILE, COLL_LAY_ZAPPER}, .collision_layer = COLL_LAY_BULLET }); bullet_body.active = false; diff --git a/game/enemy/EnemyScript.cpp b/game/enemy/EnemyScript.cpp index 8cf8b80..5c03539 100644 --- a/game/enemy/EnemyScript.cpp +++ b/game/enemy/EnemyScript.cpp @@ -4,12 +4,11 @@ #include "EnemyConfig.h" #include #include +#include #include #include #include #include -#include -#include #include #include using namespace crepe; @@ -86,7 +85,7 @@ bool EnemyScript::on_collide(const CollisionEvent & e) { if (e.info.other.metadata.tag == "player_bullet") { this->despawn_enemy(); } - Animator& body_animator = this->get_components().front(); + Animator & body_animator = this->get_components().front(); body_animator.data.col = 2; //body_animator.play(); BehaviorScript & enemy_script = this->get_component(); @@ -115,7 +114,7 @@ void EnemyScript::shoot(const vec2 & location, float angle) { = this->get_components_by_id(bullet_pos.game_object_id).front(); bullet_collider.active = true; bullet_body.active = true; - AudioSource& audio = this->get_component(); + AudioSource & audio = this->get_component(); audio.play(); return; } diff --git a/game/enemy/EnemySubScene.cpp b/game/enemy/EnemySubScene.cpp index 8316db9..607b9a9 100644 --- a/game/enemy/EnemySubScene.cpp +++ b/game/enemy/EnemySubScene.cpp @@ -2,13 +2,13 @@ #include #include +#include #include #include #include #include #include #include -#include #include #include "../Config.h" @@ -91,8 +91,7 @@ int EnemySubScene::create(Scene & scn, int enemy_counter) { .looping = true, } ); - enemy.add_component(Asset("asset/sfx/bike_gun_2.ogg")).volume - = 0.1; + enemy.add_component(Asset("asset/sfx/bike_gun_2.ogg")).volume = 0.1; AI & ai_component = enemy.add_component(3000); ai_component.path_follow_on(); BehaviorScript & enemy_script -- cgit v1.2.3