aboutsummaryrefslogtreecommitdiff
path: root/game/ForestParallaxScript.cpp
diff options
context:
space:
mode:
authorMax-001 <maxsmits21@kpnmail.nl>2024-12-21 11:19:52 +0100
committerMax-001 <maxsmits21@kpnmail.nl>2024-12-21 11:19:52 +0100
commit999e1b928aa632e80521651f14013c267af604dc (patch)
treedbb30be31d332cbc53dcbb9ab498856c80162e8c /game/ForestParallaxScript.cpp
parent0ba89eff9283d5f9f59fa763a19f4616f1c66d74 (diff)
Moved file to sub directory
Diffstat (limited to 'game/ForestParallaxScript.cpp')
-rw-r--r--game/ForestParallaxScript.cpp28
1 files changed, 0 insertions, 28 deletions
diff --git a/game/ForestParallaxScript.cpp b/game/ForestParallaxScript.cpp
deleted file mode 100644
index 27e30eb..0000000
--- a/game/ForestParallaxScript.cpp
+++ /dev/null
@@ -1,28 +0,0 @@
-#include "ForestParallaxScript.h"
-
-using namespace crepe;
-using namespace std;
-
-ForestParallaxScript::ForestParallaxScript(float begin_x, float end_x,
- std::string unique_bg_name)
- : begin_x(begin_x),
- end_x(end_x),
- name(unique_bg_name) {}
-
-void ForestParallaxScript::fixed_update(crepe::duration_t dt) {
- RefVector<Transform> vec_2
- = this->get_components_by_name<Transform>("forest_bg_2_" + name);
- RefVector<Transform> vec_3
- = this->get_components_by_name<Transform>("forest_bg_3_" + name);
-
- for (Transform & t : vec_2) {
- if (t.position.x > end_x - 400) {
- t.position.x = begin_x - 400;
- }
- }
- for (Transform & t : vec_3) {
- if (t.position.x > end_x - 400) {
- t.position.x = begin_x - 400;
- }
- }
-}