aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax-001 <maxsmits21@kpnmail.nl>2025-01-07 14:42:11 +0100
committerMax-001 <maxsmits21@kpnmail.nl>2025-01-07 14:42:11 +0100
commitf31bd86ae5d7df21b788a273d4f2e530136ec184 (patch)
treec4ef3a0f89174bb7114889d666e382b6aaddfbfa
parent8e537f4779a4bfdcd48d9387ed8a058df210b272 (diff)
Added Script suffix
-rw-r--r--game/CMakeLists.txt2
-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.cpp18
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};