Files
viseq/src/signal.h
T

34 lines
555 B
C++
Raw Normal View History

2024-10-09 02:01:23 +02:00
#pragma once
#include <raylib.h>
2024-10-09 02:01:23 +02:00
#include "datatypes.h"
#include "moveable.h"
#include "node.h"
2024-10-09 02:01:23 +02:00
class Signal : public Movable{
public:
Signal();
Signal(float x, float y, float r, float s) : Movable(Vec2D<float>(x, y), Vec2D<float>(0,0), s), radius(r) {}
2024-10-09 02:01:23 +02:00
int id = 0;
Node *next;
2024-10-16 02:26:02 +02:00
Node *last;
bool at_target = false;
2024-10-09 02:01:23 +02:00
int target_node_id = 1;
int source_node_id = 0;
float radius;
void draw(Vec2D<float> *mouse) {
position += direction.norm() * speed;
DrawCircle(position.x, position.y, radius, (Color){232, 125, 62, 255});
2024-10-09 02:01:23 +02:00
}
2024-10-09 02:01:23 +02:00
};