Olympe Engine 2.0
2D Game Engine with ECS Architecture
Loading...
Searching...
No Matches
Graph.h
Go to the documentation of this file.
1#pragma once
2#include <string>
3#include <vector>
4// use bundled nlohmann json header from workspace
5#include "../../Source/third_party/nlohmann/json.hpp"
6
7struct Node
8{
9 int id;
10 std::string type;
11 float x, y;
12};
13
14struct Graph
15{
16 std::vector<Node> nodes;
17
18 nlohmann::json ToJson() const;
19 static Graph FromJson(const nlohmann::json& j);
20};
ComponentTypeID GetComponentTypeID_Static()
Definition ECS_Entity.h:56
nlohmann::json json
Definition Graph.h:15
std::vector< Node > nodes
Definition Graph.h:16
static Graph FromJson(const nlohmann::json &j)
Definition Graph.cpp:23
nlohmann::json ToJson() const
Definition Graph.cpp:6
Definition Graph.h:8
float y
Definition Graph.h:11
float x
Definition Graph.h:11
int id
Definition Graph.h:9
std::string type
Definition Graph.h:10