diff options
-rw-r--r-- | game/CMakeLists.txt | 2 | ||||
-rw-r--r-- | game/workers/PanicFromPlayerScript.cpp (renamed from game/workers/PanicFromPlayer.cpp) | 4 | ||||
-rw-r--r-- | game/workers/PanicFromPlayerScript.h (renamed from game/workers/PanicFromPlayer.h) | 2 | ||||
-rw-r--r-- | game/workers/WorkersSubScene.cpp | 18 |
4 files changed, 13 insertions, 13 deletions
diff --git a/game/CMakeLists.txt b/game/CMakeLists.txt index dc6a3fd..0fb2424 100644 --- a/game/CMakeLists.txt +++ b/game/CMakeLists.txt @@ -24,7 +24,7 @@ add_executable(main background/StartSubScene.cpp workers/WorkersSubScene.cpp workers/WorkerScript.cpp - workers/PanicFromPlayer.cpp + workers/PanicFromPlayerScript.cpp main.cpp ) diff --git a/game/workers/PanicFromPlayer.cpp b/game/workers/PanicFromPlayerScript.cpp index fbf4611..1e49aaa 100644 --- a/game/workers/PanicFromPlayer.cpp +++ b/game/workers/PanicFromPlayerScript.cpp @@ -1,4 +1,4 @@ -#include "PanicFromPlayer.h" +#include "PanicFromPlayerScript.h" #include <crepe/api/Animator.h> #include <crepe/api/Rigidbody.h> @@ -9,7 +9,7 @@ using namespace crepe; using namespace std; -void PanicFromPlayer::fixed_update(duration_t dt) { +void PanicFromPlayerScript::fixed_update(duration_t dt) { Animator & anim_player = this->get_components_by_name<Animator>("player").front(); if (anim_player.data.col == 1) { diff --git a/game/workers/PanicFromPlayer.h b/game/workers/PanicFromPlayerScript.h index 804df5c..d173e89 100644 --- a/game/workers/PanicFromPlayer.h +++ b/game/workers/PanicFromPlayerScript.h @@ -2,7 +2,7 @@ #include <crepe/api/Script.h> -class PanicFromPlayer : public crepe::Script { +class PanicFromPlayerScript : public crepe::Script { public: void fixed_update(crepe::duration_t dt); }; diff --git a/game/workers/WorkersSubScene.cpp b/game/workers/WorkersSubScene.cpp index 5b070f8..e5b4678 100644 --- a/game/workers/WorkersSubScene.cpp +++ b/game/workers/WorkersSubScene.cpp @@ -1,5 +1,5 @@ #include "WorkersSubScene.h" -#include "PanicFromPlayer.h" +#include "PanicFromPlayerScript.h" #include "WorkerScript.h" #include "../Config.h" @@ -69,7 +69,7 @@ void WorkersSubScene::worker1(crepe::Scene & scn, float start_x, float init_spee .linear_velocity = vec2(init_speed, 0), .collision_layers = {COLL_LAY_BOT_TOP}, }); - worker_1.add_component<BehaviorScript>().set_script<PanicFromPlayer>(); + worker_1.add_component<BehaviorScript>().set_script<PanicFromPlayerScript>(); if (init_speed < 0) { worker_1_body_sprite.data.flip = Sprite::FlipSettings {true, false}; @@ -117,7 +117,7 @@ void WorkersSubScene::worker2(crepe::Scene & scn, float start_x, float init_spee .linear_velocity = vec2(init_speed, 0), .collision_layers = {COLL_LAY_BOT_TOP}, }); - worker_2.add_component<BehaviorScript>().set_script<PanicFromPlayer>(); + worker_2.add_component<BehaviorScript>().set_script<PanicFromPlayerScript>(); if (init_speed < 0) { worker_2_body_sprite.data.flip = Sprite::FlipSettings {true, false}; @@ -165,7 +165,7 @@ void WorkersSubScene::worker3(crepe::Scene & scn, float start_x, float init_spee .linear_velocity = vec2(init_speed, 0), .collision_layers = {COLL_LAY_BOT_TOP}, }); - worker_3.add_component<BehaviorScript>().set_script<PanicFromPlayer>(); + worker_3.add_component<BehaviorScript>().set_script<PanicFromPlayerScript>(); if (init_speed < 0) { worker_3_body_sprite.data.flip = Sprite::FlipSettings {true, false}; @@ -213,7 +213,7 @@ void WorkersSubScene::worker4(crepe::Scene & scn, float start_x, float init_spee .linear_velocity = vec2(init_speed, 0), .collision_layers = {COLL_LAY_BOT_HIGH}, }); - worker_4.add_component<BehaviorScript>().set_script<PanicFromPlayer>(); + worker_4.add_component<BehaviorScript>().set_script<PanicFromPlayerScript>(); if (init_speed < 0) { worker_4_body_sprite.data.flip = Sprite::FlipSettings {true, false}; @@ -261,7 +261,7 @@ void WorkersSubScene::worker5(crepe::Scene & scn, float start_x, float init_spee .linear_velocity = vec2(init_speed, 0), .collision_layers = {COLL_LAY_BOT_HIGH}, }); - worker_5.add_component<BehaviorScript>().set_script<PanicFromPlayer>(); + worker_5.add_component<BehaviorScript>().set_script<PanicFromPlayerScript>(); if (init_speed < 0) { worker_5_body_sprite.data.flip = Sprite::FlipSettings {true, false}; @@ -309,7 +309,7 @@ void WorkersSubScene::worker6(crepe::Scene & scn, float start_x, float init_spee .linear_velocity = vec2(init_speed, 0), .collision_layers = {COLL_LAY_BOT_LOW}, }); - worker_6.add_component<BehaviorScript>().set_script<PanicFromPlayer>(); + worker_6.add_component<BehaviorScript>().set_script<PanicFromPlayerScript>(); if (init_speed < 0) { worker_6_body_sprite.data.flip = Sprite::FlipSettings {true, false}; @@ -357,7 +357,7 @@ void WorkersSubScene::worker7(crepe::Scene & scn, float start_x, float init_spee .linear_velocity = vec2(init_speed, 0), .collision_layers = {COLL_LAY_BOT_LOW}, }); - worker_7.add_component<BehaviorScript>().set_script<PanicFromPlayer>(); + worker_7.add_component<BehaviorScript>().set_script<PanicFromPlayerScript>(); if (init_speed < 0) { worker_7_body_sprite.data.flip = Sprite::FlipSettings {true, false}; @@ -405,7 +405,7 @@ void WorkersSubScene::worker8(crepe::Scene & scn, float start_x, float init_spee .linear_velocity = vec2(init_speed, 0), .collision_layers = {COLL_LAY_BOT_LOW}, }); - worker_8.add_component<BehaviorScript>().set_script<PanicFromPlayer>(); + worker_8.add_component<BehaviorScript>().set_script<PanicFromPlayerScript>(); if (init_speed < 0) { worker_8_body_sprite.data.flip = Sprite::FlipSettings {true, false}; |