mirror of
https://github.com/Relintai/sfw.git
synced 2025-02-19 23:14:19 +01:00
Don't use scenes in the simplified test app.
This commit is contained in:
parent
0d5e129a52
commit
630320f9dc
@ -3,8 +3,8 @@
|
||||
|
||||
#include "sfw.h"
|
||||
|
||||
class GameScene : public Scene {
|
||||
SFW_OBJECT(GameScene, Scene);
|
||||
class GameApplication : public Application {
|
||||
SFW_OBJECT(GameApplication, Application);
|
||||
|
||||
public:
|
||||
virtual void input_event(const Ref<InputEvent> &event) {
|
||||
@ -155,7 +155,7 @@ public:
|
||||
//TextRenderer::get_singleton()->font_print("test");
|
||||
}
|
||||
|
||||
GameScene() {
|
||||
GameApplication() {
|
||||
left = false;
|
||||
right = false;
|
||||
up = false;
|
||||
@ -318,7 +318,8 @@ public:
|
||||
|
||||
Renderer::initialize();
|
||||
}
|
||||
~GameScene() {
|
||||
|
||||
~GameApplication() {
|
||||
Renderer::destroy();
|
||||
|
||||
memdelete(tile_map);
|
||||
@ -357,17 +358,4 @@ public:
|
||||
//ColoredMaterial *cmaterial;
|
||||
};
|
||||
|
||||
class GameApplication : public Application {
|
||||
SFW_OBJECT(GameApplication, Application);
|
||||
|
||||
public:
|
||||
GameApplication() {
|
||||
scene = Ref<Scene>(memnew(GameScene()));
|
||||
}
|
||||
|
||||
~GameApplication() {
|
||||
scene.unref();
|
||||
}
|
||||
};
|
||||
|
||||
#endif // GAME_APPLICATION_H
|
||||
|
Loading…
Reference in New Issue
Block a user