json is loading, but does nothing yet
This commit is contained in:
+31
-34
@@ -2,44 +2,41 @@
|
||||
|
||||
#include "datatypes.h"
|
||||
|
||||
namespace VISEQ::BASE {
|
||||
class Movable{
|
||||
|
||||
class Movable{
|
||||
public:
|
||||
Movable() {}
|
||||
virtual ~Movable() {}
|
||||
|
||||
public:
|
||||
Movable() {}
|
||||
virtual ~Movable() {}
|
||||
Movable(Vec2Df p, Vec2Df d, float s) : speed(s), position(p), direction(d) {}
|
||||
Movable(Vec2Df p, float s) : speed(s), position(p) {}
|
||||
|
||||
Movable(Vec2Df p, Vec2Df d, float s) : speed(s), position(p), direction(d) {}
|
||||
Movable(Vec2Df p, float s) : speed(s), position(p) {}
|
||||
float speed = 1.0f;
|
||||
|
||||
Vec2Df position;
|
||||
Vec2Df direction;
|
||||
|
||||
float speed = 1.0f;
|
||||
|
||||
Vec2Df position;
|
||||
Vec2Df direction;
|
||||
Vec2Df drag_offset;
|
||||
|
||||
bool in_rect = false;
|
||||
|
||||
bool picked_up = false;
|
||||
bool dragging = false;
|
||||
bool hover_connect = false;
|
||||
bool hovering = false;
|
||||
bool connecting = false;
|
||||
bool selected = false;
|
||||
bool highlighted = false;
|
||||
bool copied = false;
|
||||
|
||||
bool erase = false;
|
||||
|
||||
Vec2Df drag_offset;
|
||||
|
||||
bool in_rect = false;
|
||||
|
||||
bool picked_up = false;
|
||||
bool dragging = false;
|
||||
bool hover_connect = false;
|
||||
bool hovering = false;
|
||||
bool connecting = false;
|
||||
bool selected = false;
|
||||
bool highlighted = false;
|
||||
bool copied = false;
|
||||
|
||||
bool erase = false;
|
||||
virtual void setPosition(Vec2Df _position) {position = _position;}
|
||||
virtual Vec2Df getPosition() {return position;};
|
||||
virtual void update(double frametime) {};
|
||||
virtual void update() {};
|
||||
|
||||
virtual void setPosition(Vec2Df _position) {position = _position;}
|
||||
virtual Vec2Df getPosition() {return position;};
|
||||
virtual void update(double frametime) {};
|
||||
virtual void update() {};
|
||||
};
|
||||
|
||||
/*virtual void to_json(json& j, const Movable& M){*/
|
||||
/* j = json{{"position", M.position}, {"direction", M.direction}, {"speed", M.speed}};*/
|
||||
/*}*/
|
||||
};
|
||||
|
||||
//NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE(Movable, position, direction, speed)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user