Continued work on layout graph
This commit is contained in:
35
src/modules/stream/ui/building_layout_graph.h
Normal file
35
src/modules/stream/ui/building_layout_graph.h
Normal file
@@ -0,0 +1,35 @@
|
||||
#include <core/os/memory.h>
|
||||
#include <core/io/config_file.h>
|
||||
class BuildingLayoutGraph {
|
||||
static BuildingLayoutGraph *singleton;
|
||||
|
||||
BuildingLayoutGraph();
|
||||
|
||||
ConfigFile config;
|
||||
Array public_rooms;
|
||||
Array private_rooms;
|
||||
|
||||
flecs::entity create_graph_entity(const String &base_path,
|
||||
const String &entity_type);
|
||||
|
||||
public:
|
||||
virtual ~BuildingLayoutGraph();
|
||||
static BuildingLayoutGraph *get_singleton()
|
||||
{
|
||||
if (!singleton)
|
||||
singleton = memnew(BuildingLayoutGraph());
|
||||
return singleton;
|
||||
}
|
||||
static void cleanup()
|
||||
{
|
||||
memdelete(singleton);
|
||||
singleton = nullptr;
|
||||
}
|
||||
void get_room_data(int id, Array &result);
|
||||
const Array &get_private_rooms() const;
|
||||
const Array &get_public_rooms() const;
|
||||
void create_zone(const String &base_path, int zone_type);
|
||||
void create_unit(const String &base_path);
|
||||
void create_room(const String &base_path, int id);
|
||||
void destroy_graph_entity(const String &path);
|
||||
};
|
||||
Reference in New Issue
Block a user