2024-10-09 02:01:23 +02:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "datatypes.h"
|
2024-10-20 23:42:38 +02:00
|
|
|
#include "raylib.h"
|
2024-10-09 02:01:23 +02:00
|
|
|
|
|
|
|
|
class Movable{
|
|
|
|
|
|
|
|
|
|
public:
|
2024-10-19 04:08:46 +02:00
|
|
|
Movable() {}
|
|
|
|
|
virtual ~Movable() {}
|
|
|
|
|
|
2024-10-09 02:01:23 +02:00
|
|
|
Movable(Vec2D<float> p, Vec2D<float> d, float s) : speed(s), position(p), direction(d) {}
|
|
|
|
|
Movable(Vec2D<float> p, float s) : speed(s), position(p) {}
|
|
|
|
|
|
|
|
|
|
float speed = 1.0f;
|
|
|
|
|
|
|
|
|
|
Vec2D<float> position;
|
|
|
|
|
Vec2D<float> direction;
|
|
|
|
|
|
2024-10-22 01:55:31 +02:00
|
|
|
virtual void update(int fps) {};
|
2024-10-20 23:42:38 +02:00
|
|
|
virtual void draw(Vec2D<float> *mouse, Camera2D *cam) {};
|
2024-10-09 02:01:23 +02:00
|
|
|
|
|
|
|
|
};
|