aboutsummaryrefslogtreecommitdiff
path: root/src/example/game.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/example/game.cpp')
-rw-r--r--src/example/game.cpp29
1 files changed, 6 insertions, 23 deletions
diff --git a/src/example/game.cpp b/src/example/game.cpp
index 1f8b9e9..a028791 100644
--- a/src/example/game.cpp
+++ b/src/example/game.cpp
@@ -1,23 +1,7 @@
-#include "api/Asset.h"
-#include "api/BehaviorScript.h"
-#include "api/CircleCollider.h"
-#include "api/ParticleEmitter.h"
-#include "api/Scene.h"
-#include "manager/ComponentManager.h"
-#include "manager/Mediator.h"
-#include "types.h"
-#include <cmath>
-#include <crepe/api/BoxCollider.h>
-#include <crepe/api/Camera.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 "GameScene.h"
+
+#include <crepe/api/Engine.h>
#include <crepe/api/Script.h>
-#include <crepe/api/Sprite.h>
-#include <crepe/api/Transform.h>
-#include <crepe/api/Vector2.h>
using namespace crepe;
using namespace std;
@@ -333,9 +317,8 @@ public:
};
int main(int argc, char * argv[]) {
+ Engine gameloop;
+ gameloop.add_scene<GameScene>();
- LoopManager gameloop;
- gameloop.add_scene<ConcreteScene1>();
- gameloop.start();
- return 0;
+ return gameloop.main();
}