diff options
author | WBoerenkamps <wrj.boerenkamps@student.avans.nl> | 2025-01-08 14:50:04 +0100 |
---|---|---|
committer | WBoerenkamps <wrj.boerenkamps@student.avans.nl> | 2025-01-08 14:50:04 +0100 |
commit | 0de6692dcb029540f4502c5a2f1a0c6634f7b61f (patch) | |
tree | 001f373de315b651704b8b264e20314bc878e288 /game/enemy/EnemySubScene.cpp | |
parent | a4b9e948ac0acd14d82e009a75e1fccdddeeab9b (diff) |
start of extra features and restored player functions
Diffstat (limited to 'game/enemy/EnemySubScene.cpp')
-rw-r--r-- | game/enemy/EnemySubScene.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/game/enemy/EnemySubScene.cpp b/game/enemy/EnemySubScene.cpp index 7d3e784..8316db9 100644 --- a/game/enemy/EnemySubScene.cpp +++ b/game/enemy/EnemySubScene.cpp @@ -8,6 +8,7 @@ #include <crepe/api/GameObject.h> #include <crepe/api/Rigidbody.h> #include <crepe/api/Scene.h> +#include <crepe/api/AudioSource.h> #include <crepe/api/Sprite.h> #include "../Config.h" @@ -45,9 +46,8 @@ int EnemySubScene::create(Scene & scn, int enemy_counter) { enemy_body_sprite, ivec2(32, 32), uvec2(4, 8), Animator::Data { .fps = 5, - .col = 3, - .row = 1, - + .col = 1, + .row = 0, .looping = false, } ); @@ -91,7 +91,8 @@ int EnemySubScene::create(Scene & scn, int enemy_counter) { .looping = true, } ); - + enemy.add_component<AudioSource>(Asset("asset/sfx/bike_gun_2.ogg")).volume + = 0.1; AI & ai_component = enemy.add_component<AI>(3000); ai_component.path_follow_on(); BehaviorScript & enemy_script |