2024-10-09 02:01:23 +02:00
|
|
|
#pragma once
|
|
|
|
|
|
2024-10-13 04:22:09 +02:00
|
|
|
#include <raylib.h>
|
|
|
|
|
|
2024-10-09 02:01:23 +02:00
|
|
|
#include "datatypes.h"
|
|
|
|
|
#include "moveable.h"
|
2024-10-13 04:22:09 +02:00
|
|
|
#include "node.h"
|
2024-10-09 02:01:23 +02:00
|
|
|
|
|
|
|
|
class Signal : public Movable{
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
Signal();
|
2024-10-22 03:07:11 +02:00
|
|
|
Signal(float x, float y, float r, float s, Color color) : Movable(Vec2D<float>(x, y), Vec2D<float>(0,0), s), radius(r), color(color) {}
|
2024-10-09 02:01:23 +02:00
|
|
|
|
|
|
|
|
int id = 0;
|
2024-10-13 04:22:09 +02:00
|
|
|
|
|
|
|
|
Node *next;
|
2024-10-16 02:26:02 +02:00
|
|
|
Node *last;
|
2024-10-13 04:22:09 +02:00
|
|
|
|
|
|
|
|
bool at_target = false;
|
2024-10-09 02:01:23 +02:00
|
|
|
int target_node_id = 1;
|
|
|
|
|
int source_node_id = 0;
|
|
|
|
|
|
|
|
|
|
float radius;
|
|
|
|
|
|
2024-10-22 03:07:11 +02:00
|
|
|
Color color;
|
|
|
|
|
|
2024-10-22 01:55:31 +02:00
|
|
|
void update(int fps){
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
2024-10-20 23:42:38 +02:00
|
|
|
void draw(Vec2D<float> *mouse, Camera2D *cam) {
|
2024-10-13 04:22:09 +02:00
|
|
|
|
|
|
|
|
position += direction.norm() * speed;
|
|
|
|
|
|
2024-10-22 03:07:11 +02:00
|
|
|
DrawCircle(position.x, position.y, radius, color);
|
2024-10-09 02:01:23 +02:00
|
|
|
|
2024-10-13 04:22:09 +02:00
|
|
|
}
|
2024-10-09 02:01:23 +02:00
|
|
|
};
|