diff options
author | max-001 <maxsmits21@kpnmail.nl> | 2024-12-17 08:53:03 +0100 |
---|---|---|
committer | max-001 <maxsmits21@kpnmail.nl> | 2024-12-17 08:53:03 +0100 |
commit | 72f04cc18113785b8f57d95254d28e7d64d584aa (patch) | |
tree | 47b08f2f781d05679f76406df4838bf8697f7dc2 /src/example/Background.cpp | |
parent | 00f3ee853d94b607646e311d6bc9aca1736ab259 (diff) |
Placed every class into seperate file
Diffstat (limited to 'src/example/Background.cpp')
-rw-r--r-- | src/example/Background.cpp | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/src/example/Background.cpp b/src/example/Background.cpp new file mode 100644 index 0000000..f935d90 --- /dev/null +++ b/src/example/Background.cpp @@ -0,0 +1,54 @@ +#include "Background.h" +#include "Aquarium.h" +#include "Forest.h" +#include "Hallway.h" +#include "Start.h" + +#include <crepe/api/Animator.h> +#include <crepe/api/Asset.h> +#include <crepe/api/BehaviorScript.h> +#include <crepe/api/BoxCollider.h> +#include <crepe/api/Camera.h> +#include <crepe/api/CircleCollider.h> +#include <crepe/api/Color.h> +#include <crepe/api/Event.h> +#include <crepe/api/GameObject.h> +#include <crepe/api/LoopManager.h> +#include <crepe/api/Rigidbody.h> +#include <crepe/api/Scene.h> +#include <crepe/api/Script.h> +#include <crepe/api/Sprite.h> +#include <crepe/api/Transform.h> +#include <crepe/api/Vector2.h> +#include <crepe/types.h> +#include <iostream> + +using namespace crepe; +using namespace std; + +Background::Background(Scene & scn) { + Start start; + Hallway hallway; + Forest forest; + Aquarium aquarium; + + float begin_x = 0; + + begin_x = start.create(scn, begin_x); + + begin_x = hallway.create(scn, begin_x, 1, Color::YELLOW); + + begin_x = forest.create(scn, begin_x, "1"); + + begin_x = hallway.create(scn, begin_x, 2, Color::MAGENTA); + + begin_x = aquarium.create(scn, begin_x); + + begin_x = hallway.create(scn, begin_x, 3, Color::CYAN); + + begin_x = forest.create(scn, begin_x, "2"); + + begin_x = hallway.create(scn, begin_x, 4, Color::GREEN); + + begin_x = aquarium.create(scn, begin_x); +} |