connecting does weird things!
This commit is contained in:
+5
-8
@@ -1,19 +1,16 @@
|
||||
#pragma once
|
||||
|
||||
#include "connectable.h"
|
||||
#include "interactable.h"
|
||||
#include "moveable.h"
|
||||
#include "graph-item.h"
|
||||
#include "raymath.h"
|
||||
#include "vmath.h"
|
||||
#include <memory>
|
||||
|
||||
namespace VISEQ::GRAPH {
|
||||
class Connector : public BASE::Connectable{
|
||||
class Connector : public BASE::Connectable, public GraphItem{
|
||||
public:
|
||||
Connector() {}
|
||||
Connector(Vec2Df position, float orbit) : Movable(position, 0.0f), orbit(orbit) {}
|
||||
Connector(Vec2Df position, float orbit) : BASE::Connectable(position), orbit(orbit) {}
|
||||
|
||||
|
||||
float radius = 5.0f;
|
||||
float orbit = 14.0f;
|
||||
|
||||
@@ -27,10 +24,10 @@ namespace VISEQ::GRAPH {
|
||||
}
|
||||
|
||||
void update() override{
|
||||
|
||||
connect();
|
||||
}
|
||||
|
||||
void draw() {
|
||||
void draw() override {
|
||||
Vec2Df mp = {GetMousePosition().x, GetMousePosition().y};
|
||||
|
||||
Vec2Df connector = position - ((position - mp)).norm() * (radius + orbit);
|
||||
|
||||
Reference in New Issue
Block a user