json is loading, but does nothing yet
This commit is contained in:
+28
-24
@@ -1,40 +1,44 @@
|
||||
#pragma once
|
||||
|
||||
#include <raylib.h>
|
||||
#include "datatypes.h"
|
||||
#include "moveable.h"
|
||||
|
||||
#include "node.h"
|
||||
#include "edge.h"
|
||||
|
||||
class Signal : public Movable{
|
||||
public:
|
||||
using namespace VISEQ::GRAPH;
|
||||
|
||||
Signal();
|
||||
Signal(Vec2Df position, float r, float _speed, Color color) : Movable(position, Vec2Df(0,0), _speed), radius(r), color(color) {}
|
||||
|
||||
SPTR_Node next;
|
||||
SPTR_Node last;
|
||||
SPTR_Edge edge;
|
||||
namespace VISEQ::SIGNAL {
|
||||
class Signal : public BASE::Movable{
|
||||
public:
|
||||
|
||||
SPTR_Node start;
|
||||
Signal();
|
||||
Signal(Vec2Df position, float r, float _speed, Color color) : Movable(position, Vec2Df(0,0), _speed), radius(r), color(color) {}
|
||||
|
||||
NODES::SPTR_Node next;
|
||||
NODES::SPTR_Node last;
|
||||
EDGES::SPTR_Edge edge;
|
||||
|
||||
bool at_target = false;
|
||||
NODES::SPTR_Node start;
|
||||
|
||||
float radius;
|
||||
bool at_target = false;
|
||||
|
||||
float multiplier = 1.0f;
|
||||
float radius;
|
||||
|
||||
Color color;
|
||||
float multiplier = 1.0f;
|
||||
|
||||
void update(double t_delta){
|
||||
// 120px / 16th = 1920px / whole note
|
||||
// whole note = 2s at 120bpm
|
||||
// 960px / s
|
||||
position += direction.norm() * speed * multiplier * (float)t_delta / 1000000.0f;
|
||||
}
|
||||
Color color;
|
||||
|
||||
void draw(Vec2Df mouse, Camera2D cam) {
|
||||
DrawCircle(position.x, position.y, radius, color);
|
||||
}
|
||||
};
|
||||
void update(double t_delta){
|
||||
// 120px / 16th = 1920px / whole note
|
||||
// whole note = 2s at 120bpm
|
||||
// 960px / s
|
||||
position += direction.norm() * speed * multiplier * (float)t_delta / 1000000.0f;
|
||||
}
|
||||
|
||||
void draw(Vec2Df mouse, Camera2D cam) {
|
||||
DrawCircle(position.x, position.y, radius, color);
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user