diff options
author | heavydemon21 <nielsstunnebrink1@gmail.com> | 2025-01-08 16:32:33 +0100 |
---|---|---|
committer | heavydemon21 <nielsstunnebrink1@gmail.com> | 2025-01-08 16:32:33 +0100 |
commit | 9ae8d8f860146c1777e55dec7bd455aa16351375 (patch) | |
tree | 76b8fc05b3adf24267fb919c1451ed0f3781b955 /game/enemy/EnemyScript.cpp | |
parent | eb3d9ec9baa0b95b95d741a0615adaf4c8c1d3c0 (diff) |
make format
Diffstat (limited to 'game/enemy/EnemyScript.cpp')
-rw-r--r-- | game/enemy/EnemyScript.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
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 <crepe/api/AI.h> #include <crepe/api/Animator.h> +#include <crepe/api/AudioSource.h> #include <crepe/api/BoxCollider.h> #include <crepe/api/ParticleEmitter.h> #include <crepe/api/Rigidbody.h> #include <crepe/api/Transform.h> -#include <crepe/api/AudioSource.h> -#include <crepe/api/Animator.h> #include <crepe/types.h> #include <random> 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<Animator>().front(); + Animator & body_animator = this->get_components<Animator>().front(); body_animator.data.col = 2; //body_animator.play(); BehaviorScript & enemy_script = this->get_component<BehaviorScript>(); @@ -115,7 +114,7 @@ void EnemyScript::shoot(const vec2 & location, float angle) { = this->get_components_by_id<BoxCollider>(bullet_pos.game_object_id).front(); bullet_collider.active = true; bullet_body.active = true; - AudioSource& audio = this->get_component<AudioSource>(); + AudioSource & audio = this->get_component<AudioSource>(); audio.play(); return; } |