partial reload from json working, but edges make problems
This commit is contained in:
+4
-2
@@ -2,6 +2,7 @@
|
||||
|
||||
#include "raylib.h"
|
||||
#include <cmath>
|
||||
#include <iostream>
|
||||
|
||||
#include "nlohmann/json.hpp"
|
||||
|
||||
@@ -107,12 +108,13 @@ namespace VISEQ::VMATH{
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
void to_json(json& j, const Vec2D<T> V){
|
||||
void to_json(json& j, const Vec2D<T>& V){
|
||||
j = json{{"x",V.x},{"y",V.y}};
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
void from_json(const json& j, Vec2D<T> V){
|
||||
void from_json(const json& j, Vec2D<T>& V){
|
||||
std::cout << "Vec2D" << std::endl;
|
||||
j.at("x").get_to(V.x);
|
||||
j.at("y").get_to(V.y);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user