aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/example/ForestSubScene.cpp6
-rw-r--r--src/example/GameScene.cpp4
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);