2023-12-18 17:06:11 +01:00
|
|
|
#ifndef GAME_SCENE_H
|
|
|
|
#define GAME_SCENE_H
|
|
|
|
|
2023-12-31 15:04:17 +01:00
|
|
|
#include "render_core/scene.h"
|
|
|
|
|
|
|
|
#include "render_core/color_material.h"
|
|
|
|
#include "render_core/colored_material.h"
|
2024-01-04 12:12:57 +01:00
|
|
|
#include "render_core/font.h"
|
2024-01-03 14:04:22 +01:00
|
|
|
#include "render_core/image.h"
|
2023-12-31 15:04:17 +01:00
|
|
|
#include "render_core/mesh.h"
|
|
|
|
#include "render_core/texture.h"
|
|
|
|
#include "render_core/texture_material.h"
|
|
|
|
#include "render_core/texture_material_2d.h"
|
2024-01-03 14:04:22 +01:00
|
|
|
#include "render_objects/camera_2d.h"
|
|
|
|
#include "render_objects/camera_3d.h"
|
2024-01-04 14:37:11 +01:00
|
|
|
#include "render_objects/mesh_instance_2d.h"
|
2024-01-03 14:04:22 +01:00
|
|
|
#include "render_objects/mesh_instance_3d.h"
|
|
|
|
#include "render_objects/sprite.h"
|
2024-01-04 17:54:40 +01:00
|
|
|
#include "render_objects/text_2d.h"
|
2024-01-03 14:04:22 +01:00
|
|
|
#include "render_objects/tile_map.h"
|
2023-12-19 15:57:36 +01:00
|
|
|
|
2023-12-18 17:06:11 +01:00
|
|
|
class GameScene : public Scene {
|
2024-01-03 14:04:22 +01:00
|
|
|
SFW_OBJECT(GameScene, Scene);
|
|
|
|
|
2023-12-18 17:06:11 +01:00
|
|
|
public:
|
2024-01-03 18:39:58 +01:00
|
|
|
virtual void input_event(const Ref<InputEvent> &event);
|
2023-12-19 15:57:36 +01:00
|
|
|
virtual void update(float delta);
|
|
|
|
virtual void render();
|
2024-01-04 21:33:41 +01:00
|
|
|
virtual void render_immediate();
|
|
|
|
virtual void render_obj();
|
2023-12-18 17:06:11 +01:00
|
|
|
|
2023-12-19 15:57:36 +01:00
|
|
|
GameScene();
|
|
|
|
~GameScene();
|
2024-01-03 18:39:58 +01:00
|
|
|
|
2023-12-19 15:57:36 +01:00
|
|
|
bool left;
|
|
|
|
bool right;
|
|
|
|
bool up;
|
|
|
|
bool down;
|
|
|
|
|
2023-12-31 01:33:19 +01:00
|
|
|
Ref<Image> image;
|
2024-01-04 21:33:41 +01:00
|
|
|
Ref<Texture> texture;
|
|
|
|
Ref<TextureMaterial2D> material;
|
2023-12-20 10:41:16 +01:00
|
|
|
|
2024-01-04 12:12:57 +01:00
|
|
|
Ref<Font> _font;
|
|
|
|
Sprite *_font_test_sprite;
|
2024-01-04 21:33:41 +01:00
|
|
|
Ref<FontMaterial> _font_test_mat;
|
2024-01-04 12:12:57 +01:00
|
|
|
|
2024-01-04 14:37:11 +01:00
|
|
|
Ref<Mesh> _font_test_mesh;
|
|
|
|
MeshInstance2D *_font_test_mi;
|
|
|
|
|
2023-12-20 10:41:16 +01:00
|
|
|
Camera2D *camera_2d;
|
2023-12-20 14:17:03 +01:00
|
|
|
TileMap *tile_map;
|
2023-12-19 15:57:36 +01:00
|
|
|
Sprite *sprite;
|
|
|
|
|
2023-12-20 14:33:24 +01:00
|
|
|
Camera3D *camera;
|
2024-01-05 14:14:30 +01:00
|
|
|
Ref<Mesh> mesh;
|
2023-12-20 14:33:24 +01:00
|
|
|
MeshInstance3D *mi;
|
|
|
|
MeshInstance3D *mi2;
|
2024-01-04 21:33:41 +01:00
|
|
|
Ref<ColorMaterial> color_material;
|
2023-12-20 09:47:21 +01:00
|
|
|
|
2024-01-04 17:54:40 +01:00
|
|
|
Text2D *_text_2d;
|
|
|
|
|
2023-12-20 09:47:21 +01:00
|
|
|
//ColoredMaterial *cmaterial;
|
2023-12-18 17:06:11 +01:00
|
|
|
};
|
|
|
|
|
2023-12-18 17:18:54 +01:00
|
|
|
#endif
|