more refactoring and breaking things
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
#include "signal.h"
|
||||
|
||||
#include <raylib.h>
|
||||
#include "node.h"
|
||||
|
||||
namespace VISEQ::SIGNAL {
|
||||
void Signal::reset(){
|
||||
toStart();
|
||||
}
|
||||
|
||||
void Signal::toStart(){
|
||||
position = start.lock()->position;
|
||||
}
|
||||
|
||||
void Signal::update(double t_delta){
|
||||
// 120px / 16th = 1920px / whole note
|
||||
// whole note = 2s at 120bpm
|
||||
// 960px / s
|
||||
if(run) position += direction.norm() * speed * multiplier * (float)t_delta / 1000000.0f;
|
||||
}
|
||||
|
||||
void Signal::draw(Vec2Df mouse, Camera2D cam) {
|
||||
DrawCircle(position.x, position.y, radius, color);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user