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"
|
#include "sfw.h"
|
||||||
|
|
||||||
class GameScene : public Scene {
|
class GameApplication : public Application {
|
||||||
SFW_OBJECT(GameScene, Scene);
|
SFW_OBJECT(GameApplication, Application);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
virtual void input_event(const Ref<InputEvent> &event) {
|
virtual void input_event(const Ref<InputEvent> &event) {
|
||||||
@ -155,7 +155,7 @@ public:
|
|||||||
//TextRenderer::get_singleton()->font_print("test");
|
//TextRenderer::get_singleton()->font_print("test");
|
||||||
}
|
}
|
||||||
|
|
||||||
GameScene() {
|
GameApplication() {
|
||||||
left = false;
|
left = false;
|
||||||
right = false;
|
right = false;
|
||||||
up = false;
|
up = false;
|
||||||
@ -318,7 +318,8 @@ public:
|
|||||||
|
|
||||||
Renderer::initialize();
|
Renderer::initialize();
|
||||||
}
|
}
|
||||||
~GameScene() {
|
|
||||||
|
~GameApplication() {
|
||||||
Renderer::destroy();
|
Renderer::destroy();
|
||||||
|
|
||||||
memdelete(tile_map);
|
memdelete(tile_map);
|
||||||
@ -357,17 +358,4 @@ public:
|
|||||||
//ColoredMaterial *cmaterial;
|
//ColoredMaterial *cmaterial;
|
||||||
};
|
};
|
||||||
|
|
||||||
class GameApplication : public Application {
|
|
||||||
SFW_OBJECT(GameApplication, Application);
|
|
||||||
|
|
||||||
public:
|
|
||||||
GameApplication() {
|
|
||||||
scene = Ref<Scene>(memnew(GameScene()));
|
|
||||||
}
|
|
||||||
|
|
||||||
~GameApplication() {
|
|
||||||
scene.unref();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif // GAME_APPLICATION_H
|
#endif // GAME_APPLICATION_H
|
||||||
|
Loading…
Reference in New Issue
Block a user