diff options
author | max-001 <maxsmits21@kpnmail.nl> | 2024-12-19 11:04:26 +0100 |
---|---|---|
committer | max-001 <maxsmits21@kpnmail.nl> | 2024-12-19 11:04:26 +0100 |
commit | 1e6aaf13f4ecdc67e75eb26bcd8a6f0059c5cfe9 (patch) | |
tree | d274b7ef4566b80f7373e7c664bd9e2b83982df2 | |
parent | 8100a6ce6380e6efe701cffc0b628fc412f4e13b (diff) |
Changed Script names
-rw-r--r-- | src/example/ForestSubScene.cpp | 6 | ||||
-rw-r--r-- | src/example/GameScene.cpp | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/example/ForestSubScene.cpp b/src/example/ForestSubScene.cpp index d472ab4..713d95f 100644 --- a/src/example/ForestSubScene.cpp +++ b/src/example/ForestSubScene.cpp @@ -11,9 +11,9 @@ using namespace crepe; using namespace std; -class ParallaxScript : public Script { +class ForestParallaxScript : public Script { public: - ParallaxScript(float begin_x, float end_x, std::string unique_bg_name) + ForestParallaxScript(float begin_x, float end_x, std::string unique_bg_name) : begin_x(begin_x), end_x(end_x), name(unique_bg_name) {} @@ -44,7 +44,7 @@ private: float ForestSubScene::create(Scene & scn, float begin_x, std::string unique_bg_name) { GameObject script = scn.new_object("forest_script", "background"); - script.add_component<BehaviorScript>().set_script<ParallaxScript>( + script.add_component<BehaviorScript>().set_script<ForestParallaxScript>( begin_x - 400, begin_x + 3000 + 400, unique_bg_name); this->add_background(scn, begin_x, unique_bg_name); diff --git a/src/example/GameScene.cpp b/src/example/GameScene.cpp index faa08fe..50b61d8 100644 --- a/src/example/GameScene.cpp +++ b/src/example/GameScene.cpp @@ -22,7 +22,7 @@ using namespace crepe; using namespace std; -class MoveCameraScript : public Script { +class MoveCameraManualyScript : public Script { public: void init() { subscribe<KeyPressEvent>( @@ -114,7 +114,7 @@ void GameScene::load_scene() { Camera::Data{ .bg_color = Color::RED, }); - camera.add_component<BehaviorScript>().set_script<MoveCameraScript>(); + camera.add_component<BehaviorScript>().set_script<MoveCameraManualyScript>(); camera.add_component<Rigidbody>(Rigidbody::Data{}); PlayerSubScene player(*this); |